---
title: "Script Actions"
canonical: "https://help.agiloft.com/space/HELP/43715131/Script+Actions"
format: markdown
---
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.



> ℹ️ **Example**
> ℹ️ 
> ℹ️ 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.


# <span style="color: #0752a0">Create a Script Action</span>

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.
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`

## 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


#### Related articles



> Macro (contentbylabel)