How to hide 'Create known error article' link on problem form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago - last edited 11 hours ago
Hi Team,
Could someone please help me with configuring the visibility of the "Create Known Error Article" link based on the following conditions:
For P1/P2 tickets:
The link should be visible only when the ticket is in the Root Cause Analysis (RCA) state.For P3/P4 tickets:
The link should be visible when the ticket is in New, Assess, or Root Cause Analysis states.
I attempted to use the following condition, but I’m unable to structure it correctly to cover all scenarios:
(!(current.primary_known_error_article)) && (!current.duplicate_of) && ( (current.priority == '3' || current.priority == '4') && (current.state == '101' || current.state == '102' || current.state == '103') ) || ( (current.priority == '1' || current.priority ==’2’)&& state == 103
)
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago - last edited 11 hours ago
Hi @PhanitaM
In here "&& state == 103" you missed "current"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @PhanitaM ,
You can modify the UI Action condition field using a script that checks the priority and state of the current record. For P1/P2 tickets, the link should only be visible when the ticket is in the Root Cause Analysis state (state = 103). For P3/P4 tickets, the link should be visible when the ticket is in the New (state = 1), Assess (state = 2), or Root Cause Analysis (state = 103) states.
(!(current.primary_known_error_article)) && (!current.duplicate_of) && (
((current.priority == '3' || current.priority == '4') && (current.state == '1' || current.state == '2' || current.state == '103')) ||
((current.priority == '1' || current.priority == '2') && current.state == '103')
)
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @PhanitaM ,
Your original logic missed parentheses and had a smart quote. Use this ...\
(!(current.primary_known_error_article) && !current.duplicate_of) &&
(
( (current.priority == '1' || current.priority == '2') && (current.state == '103') ) ||
( (current.priority == '3' || current.priority == '4') && (current.state == '101' || current.state == '102' || current.state == '103') )
)
paste this code in condition field