IBM Support

Automation Scripting – Object Launch Point – UPDATE

Question & Answer


Question

How can a field be populated on Object Launch Point with an UPDATE?

Answer

In the following example, Scripting Attribute 1 (SR.SCRIPTINGATTRIBUTE1) will be populated on the SR application with the Logged In User ID when an SR is created then Updated.

To create an Object Launch Point executing on ADD to set a field to USERID please reference the following steps:

1) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action Create – Script with Object Launch Point:



2) Within the 'Create Script with Object Launch Point : Step 1 of 3' add the following:

Launch Point: USERID
Description: Setting SCRIPTINGATTRIBUTE1 to USERID
Active: CHECKED
Object: SR

Events:
Update? CHECKED



Click on the 'Next' button:

3) Within the 'Create Script with Object Launch Point : Step 2 of 3' add the following:

Script: USERID
Script Language: jython



4) Within the Variables pane, click on New Row. Add the following:

Variable: TICKETID
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: TICKETID



5) Click on New Row in the Variables pane to add another Variable:

Variable: SCRIPTINGATTRIBUTE1
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: SCRIPTINGATTRIBUTE1



6) Click on Next button. Within the 'Create Script with Object Launch Point : Step 3 of 3' add the following script:

if TICKETID is not None:
SCRIPTINGATTRIBUTE1 = user



Click on the Create button. Correct any error that may appear. The following dialog will be displayed:



7) Access an existing SR:



Within the persistent 'Scripting Attribute 2' field, type in a value (in this example, 'test' was used)



Tab out of 'Scripting Attribute 2' and 'Scripting Attribute 1' field is populated with the USER:

[{"Product":{"code":"SSLKT6","label":"IBM Maximo Asset Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"System Related","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Edition":"All Editions","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
17 June 2018

UID

swg21648318