About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Question & Answer
Question
How can a field be set from the previous value using Automation Scripting?
Answer
In the following example, a user defined field PREVOWNER in the SR application will be set when the OWNER field is updated.
1) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action – Create – Scripting with Attribute Launch Point:
2) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action – Create – Scripting with Attribute Launch Point:
Launch Point: OWNER
Description: Setting PREVOWNER from OWNER
Active: CHECKED
Object: SR
Attribute: OWNER
Click on the 'Next' button.
3) Within the 'Create Script with Attribute Launch Point : Step 2 of 3' add the following:
Script: OWNER
Description: Setting PREVOWNER from OWNER
Script Language: jython
4) Within the Variables pane, click on New Row. Add the following:
Variable: OWNER
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: OWNER
5) Within the Variables pane, click on New Row. Add the following:
Variable: PREVOWNER
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: PREVOWNER
6) Click on Next button. Within the 'Create Script with Attribute Launch Point : Step 3 of 3' add the following script:
PREVOWNER = owner_previous
Click on the Create button. Correct any error that may appear. The following dialog will be displayed:
7) Access an SR and set an Owner:
8) On the same SR, change the OWNER from STANLEY to MILLER:
The PREVOWNER field will now be populated with STANLEY and the OWNER field will be the new owner MILLER.
[{"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"}}]
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21648333
Manage My Notification Subscriptions