Scripting is an advanced option that allows you to execute a script when an action is triggered. Scripts can be executed under any set of conditions.

The action defines the file name and location of a script; the condition under which the script is run is defined by the rule’s search criteria or when an action button is pressed. Script actions are not often needed because most actions can be accomplished with the default action types.

A Script action runs when a new Training Signup record is created, which signs a new person up for training. The script copies two master KBs to create the Training KBs for the trainee, populates their passwords and login information, and then updates the KB record and Training Signup record with the information needed for a trainee to login.

Create a Script Action

You can find the Actions wizard with several different navigation paths, but the easiest is to select Setup [Table Name] on the left pane for the table where you wish to create your action.

  1. Select the Actions tab in the Table wizard.
  2. Click Create Script Action.
  3. Name your action and give it a description. The name of the Script action must match the name of the script file.

    Once your action is saved the system automatically adds an S: before your given title to distinguish the action as Script.

  4. Click Finish.
  5. Locate and upload your script to one of the following server file installation directories, based on your server type:
    1. For Linux servers: /usr/local/agiloft/data/[KB]/scripts
    2. For Windows servers: /agiloft/scripts

      For security reasons, it is not possible to upload the file to the server from the browser. You must have direct access to the server.

File Extensions

The following extensions designate how the script executes:

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.