The CreatorCon Call for Content is officially open! Get started here.

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,

1 ACCEPTED SOLUTION

Hi @PhanitaM  ,

you can increase the length of the 'Condition' field. By default its  254. 

 

<your instance url >/sys_dictionary_list.do?sysparm_nostack=true&sysparm_query=elementSTARTSWITHcondition%5EnameSTARTSWITHsys_ui_action&sysparm_first_row=1&sysparm_view=&sysparm_choice_query_raw=&sysparm_list_header_search=true

 

 

TejasSN_LogicX_0-1759027282182.png

 

View solution in original post

5 REPLIES 5

Rafael Batistot
Kilo Patron

Hi @PhanitaM 

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

If you found this response helpful, please mark it as Helpful. If it fully answered your question, consider marking it as Correct. Doing so helps other users find accurate and useful information more easily.

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/

TejasSN_LogicX
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

 

Hello @TejasSN_LogicX 

 Condition is exceeding it seems, unable to add it completely in the Condition field.  how can i achieve it.

 

Regards,