Page tree

Script Actions

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 access the Actions wizard in several ways, but the easiest way is to select Setup [Table] from the table where you want to create the action.

  1. From the top nav bar, expand the table's drop-down and select Setup [Table].
  2. Select the Actions tab in the Table wizard.
  3. Click Create Script Action.
  4. 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.

  5. Click Finish.
  6. 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:

  • .pl – Executed by the Perl interpreter
  • .jar or .class – Dynamically loaded and run as a java class
  • .bsh – Executed as BeanShell scripts
  • .py – Executed as Python scripts
  • .exe or any unrecognized extensions – Treated as executables