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.
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)
On the Variables tab, in the Variables section, expand the parentval
variable and fill in the Variable Type field with the value IN
.
Find the variable key
, exapnd it and fill in the Variable Type field with the value INOUT
.
Also, find the variable id
, exapnd it and fill in the Variable Type field with the value INOUT
, as shown in the following image:
On the Launch Point Tab, verify that the launch point USESEQWO
is listed and activated in the Launch Point section.
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: