How to show/hide a widget based on some conditions

Sathwik1
Tera Expert

I had a widget with a single button it needs to visible only when an incident is in the resolved state.  if it is in other states then the widget need to hide

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Sathwik 

where are you using the widget and how?

you can have user criteria for widget

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

In Pages[sp_page], for a particular page there are 4 widgets already...

so I have added a new widget, widget consists of a button... It needs to visible only when the incident state is resolved

I think user criteria will not be worked here...because I need to set a condition based on an incident state..i.e., when incident state is resolved the widget need to show otherwise hide

Hi,

that's correct.

then somehow in the widget script you need to access the incident record and based on state show/hide the button

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader