Question & Answer
Question
How can a field be populated by the logged in user?
Answer
In the following example, when a SR is created, the REPORTEDBYID field will be populated with the user that created the SR:
1) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action – Create – Scripting with Attribute Launch Point:
2) Within the 'Create Script with Attribute Launch Point : Step 1 of 3' add the following:
Launch Point: REPORTEDBYID
Description: SR REPORTEDBYID to USER
Active: CHECKED
Object: SR
Attribute: TICKETID
Click on the 'Next' button.
3) Within the 'Create Script with Attribute Launch Point : Step 2 of 3' add the following:
Script: REPORTEDBYID
Description: SR REPORTEDBYID to USER
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) Within the Variables pane, click on New Row. Add the following:
Variable: REPORTEDBYID
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: REPORTEDBYID
6) Click on Next button. Within the 'Create Script with Attribute Launch Point : Step 3 of 3' add the following script:
if TICKETID is not None:
REPORTEDBYID = user
Click on the Create button. Correct any error that may appear. The following dialog will be displayed:
7) Create a New SR – the 'Reported By' field will be populated with the Logged On User:
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21648352