I want to hide UI action once clicked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
I created a UI Action named "xyz" when it is clicked it is redirecting to some form link. The link was setup in UI Action script only. In the condition field also there several conditions which required to show the button in the change_request form. Now, I want the UI button on the change form hidden when it is clicked once.
Limitations:
We cannot create a flag variable
We cannot use DOM manipulation
We cannot use sessionstorage as the button might appear again.
We cannot use the condition field of UI action bcoz it already exceeded the character max length.
There is no field change or popup message appears, so we cannot control visibility on states.
Is there any alternative way? @Earl Duque Can you help on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Unless you keep a track of whether button is clicked or not how will system know if UI action needs to be shown/hidden.
You can use a hidden form field and then use that in condition.
if max length is reached for UI action condition field then call script include function and move your condition to script include function and return true/false
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
