IBM Support

Automation Scripting – Object Launch Point – ADD

Question & Answer


Question

How can an object launch point be used to set USERID?

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

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:
Add? 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 the SR application, create a new Record, click on Save. Scripting Attribute 1
(SCRIPTINGATTRIBUTE1) will be populated with the logged in 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

swg21648311