How to hide 'Create known error article' link on problem form

PhanitaM
Tera Contributor

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

)

 

PhanitaM_0-1758908064146.png

PhanitaM_2-1758908281508.png

 

Thanks,

3 REPLIES 3

Rafael Batistot
Kilo Patron

Hi @PhanitaM 

In here "&& state == 103" you missed "current" 

kaushal_snow
Mega Sage

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.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/

tejas1111
Tera Contributor

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

tejas1111_0-1758941764168.png