- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2020 02:12 AM
Hi,
that's correct
The UI action will only be shown when incident is in Resolved state.
For all other states it will be hidden
UI Action condition evaluate when form loads
Happy learning
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 07:51 AM
Sir, how can i give condition when button A should be hide on click of other button B.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 08:00 AM
Hi Roop,
What is your business use-case/requirement here? If you could explain that
UI Action conditions are evaluated only once i.e. when form loads
Why you want to hide button A on click of button B?
Although this is possible using DOM manipulation but it is not recommended
You can have conditions for both the UI Actions in such a way that at one time only 1 is visible
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 08:04 AM
Hello Roop,
UI action will be shown or hidden based on the condition field only during the form load. That said you can use a Client script to show or hide based on a field value via Dom manipulation (**NOT recommended**). They are really designed for edge cases where there is no other real solution available. If at all possible, you should use the standard ‘Condition’ field (for role-specific or other criteria) or the ‘UI Action Visibility’ related list (for view-specific criteria) on a UI action and stick to the out-of-box functionality in these cases.
https://www.servicenowguru.com/scripting/client-scripts-scripting/removing-form-buttons/
- Pradeep Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 08:06 AM
Hi,
on A Button click if you are updating any field into database like changing state field so based on that state you can make button B visible using condition .
example .current.state=="0"||current.state=="1"
here 0,1 are the state values ,you can add your state value if you want to make buttion B visible based on state change.
If you have different condition please mention it here so i can help you.
If this answer helps then please mark it as correct and helpful.
Thanks,
Manjusha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2020 01:09 AM