Associating Events with Scripts

After you enable an event and add a script to your system, you can associate a script with an event. Associating a script with an event allows Civic Platform to execute or run the script when the event occurs.

To associate an event with a script, the script must already exist. For information on adding a script to your system, see Working with Scripts.

Example Use Case

Someone applies for a permit and you want Civic Platform to check the license expiration date to confirm that the license has not expired. You select an event such as ApplicationSubmitBefore and then associate a script that compares license expiration dates with the current date.

To associate an event with a script

  1. Choose Administrator Tools > Events > Script.

  2. Search for the event that you want. For details, see Searching for an Active Event.

  3. Use the Script Name drop-down list to choose the script that you want to associate with this event.

  4. Click Save.