Custom SQL Commands: Difference between revisions

From UmsWiki
Jump to navigation Jump to search
Kia (talk | contribs)
No edit summary
Kia (talk | contribs)
No edit summary
Line 5: Line 5:
If you ever want to use the UNILOGIN column, you'll need to run it after SLI - use the checkbox to change from before to after.
If you ever want to use the UNILOGIN column, you'll need to run it after SLI - use the checkbox to change from before to after.


== Jobs ==
==Jobs==
The following is a list of all programs you can attach Custom SQL commands to. Note that you will only see the programs you have licenses for. (GetStudents require no license)
The following is a list of all programs you can attach Custom SQL commands to. Note that you will only see the programs you have licenses for. (GetStudents require no license)


== [[GetStudents]] ==
==[[GetStudents]]==
Always use the table '''ImportFromDB''' instead of the Students table when doing these SQL commands.
Always use the table '''ImportFromDB''' instead of the Students table when doing these SQL commands.
[[File:Custom SQL commands GetStudents.jpg|none|thumb|725x725px]]
[[File:Custom SQL commands GetStudents.jpg|none|thumb|725x725px]]


=== Description ===
====Description====
Enter a name.
Enter a name.


=== Priority ===
====Priority====
This control in which order commands should run.
This control in which order commands should run.


=== SQL command ===
====SQL command====
Enter the SQL command UMS will run.
Enter the SQL command UMS will run.


You can create a Store Procedure and run that instead use the command "'''Exec''' '''<Stored Procedure Name>'''"
You can create a Store Procedure and run that instead use the command "'''Exec''' '''<Stored Procedure Name>'''"


=== Add users to groups ===
===Add users to groups===
This option allows you to create new groups in UMS. These groups will be handled like any other group coming from the administrative system.
This option allows you to create new groups in UMS. These groups will be handled like any other group coming from the administrative system.
[[File:Custom SQL commands GetStudents Add users to groups.jpg|none|thumb|725x725px]]
[[File:Custom SQL commands GetStudents Add users to groups.jpg|none|thumb|725x725px]]


=== SQL Command ===
====SQL Command====
Only write the part that comes after the SQL Where sentence and not the whole SQL sentence.
Only write the part that comes after the SQL Where sentence and not the whole SQL sentence.


=== GetStudents ===
====GetStudents====
All fields under this setting are text fields.
All fields under this setting are text fields.



Revision as of 12:56, 24 January 2019

Custom SQL Commands are a feature for executing customized SQL at specific moments in various background jobs. This moment depends on the job you attach the SQL command to.

This feature is found here: Configurator -> Settings -> Custom SQL Commands

If you ever want to use the UNILOGIN column, you'll need to run it after SLI - use the checkbox to change from before to after.

Jobs

The following is a list of all programs you can attach Custom SQL commands to. Note that you will only see the programs you have licenses for. (GetStudents require no license)

GetStudents

Always use the table ImportFromDB instead of the Students table when doing these SQL commands.

Description

Enter a name.

Priority

This control in which order commands should run.

SQL command

Enter the SQL command UMS will run.

You can create a Store Procedure and run that instead use the command "Exec <Stored Procedure Name>"

Add users to groups

This option allows you to create new groups in UMS. These groups will be handled like any other group coming from the administrative system.

SQL Command

Only write the part that comes after the SQL Where sentence and not the whole SQL sentence.

GetStudents

All fields under this setting are text fields.

GetTimetable

Moodle

Moodle Cohort

Canvas

Google Apps Drive Sync

Google Apps Sites Sync

Fronter

ELEARNINGFORCE

Export User Info to Admin systems

Office 365 SharePoint Sync

OneNote Class Notebook

SLI