Question & Answer
Question
How can a field be hidden using Automation Scripting
Answer
In the following example, within the SR application, the Internal Priority Field will be 'hidden' if the Reported Priority field doesn't have a value.
1) Go To – System Configuration – Platform Configuration – Automation Scripting – click on Select Action – Create – Scripting with Object Launch Point:
2) Within the 'Create Script with Object Launch Point : Step 1 of 3' add the following:
Launch Point: INTERNALPRIORITY
Description: Setting INTERNALPRIORITY to hidden
Active: CHECKED
Object: SR
Add? CHECKED
Initialize? CHECKED
Update? CHECKED
Click on the 'Next' button.
3) Within the 'Create Script with Object Launch Point : Step 2 of 3' add the following:
Script: INTERNALPRIORITY
Description: Setting INTERNALPRIORITY to hidden
Script Language: jython
4) Within the Variables pane, click on New Row. Add the following:
Variable: INTERNALPRIORITY
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: INTERNALPRIORITY
5) Within the Variables pane, click on New Row. Add the following:
Variable: REPORTEDPRIORITY
Variable Type: INOUT
Override? CHECKED
Binding Type: ATTRIBUTE
Launch Point Attribute: REPORTEDPRIORITY
6) Click on Next button. Within the 'Create Script with Attribute Launch Point : Step 3 of 3' add the following script:
if REPORTEDPRIORITY is None:
INTERNALPRIORITY_hidden = True
Click on the Create button. Correct any error that may appear. The following dialog will be displayed:
7) Access the SR application and create a new SR – the 'Reported Priority' field is null and the 'Internal Priority' field is 'hidden':
Enter a value in the 'Reported Priority' field and click on Save:
The 'Internal Priority' field will now be editable.
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21648330