Skip to content

Latest commit

 

History

History
executable file
·
49 lines (20 loc) · 1.91 KB

AS05_useSequence.md

File metadata and controls

executable file
·
49 lines (20 loc) · 1.91 KB

Automation script to use a sequence instead of an autokey

This script allows for the current unique id sequence to be used to set the record key value instead of using an autokey. Launch points can be created for various objects, such as work orders and tickets, and still use the same script. You can remove the autokey from the field in question. This example uses the Reported By field for the launch point, and it is recommended that you use the script for fields that do not require user entry. The script can further be expanded to process differently by site or based on the interactive flag.

Step 1: Automation Script tab

In the Automation Scripts application, select the Create > Script with an Attribute Launch Point action and paste the following script into the Source Code field on the Automation Script tab

key=str(id)

Use Sequence

Step 2: Variables tab

On the Variables tab, in the Variables section, expand the parentval variable and fill in the Variable Type field with the value IN.

Use Sequence

Find the variable key, exapnd it and fill in the Variable Type field with the value INOUT.

Use Sequence

Also, find the variable id, exapnd it and fill in the Variable Type field with the value INOUT, as shown in the following image:

Use Sequence

Step 3: Launch Points tab

On the Launch Point Tab, verify that the launch point USESEQWO is listed and activated in the Launch Point section.

Use Sequence

Also, at the Attribute Launch Point section, verify that the Attribute field is set to REPORTEDBY value and tjat the variables are listed into the Launch Point Variables, as shown in the following image:

Use Sequence