Dynamic Display/Hide of UI Actions

ReiK
Tera Contributor

Sorry, this might sound strange since I used machine translation.

 

I want to dynamically display UI Actions in real-time when a user modifies a specific field value.

 

Based on my personal research so far:

1,The user modifies a specific field value.
2,The modified field value satisfies the UI Action's condition.
3,The form is saved or submitted.
4,The page reloads, and the UI Action is displayed.


This sequence allows the UI Action to be displayed. However, ideally, we would like the UI Action to appear dynamically at the moment the field value is set (similar to how UI Policies can dynamically show or hide fields based on specific conditions).

 

Is the display of UI Actions only triggered when the form reloads (such as during a page reload)? Or is it possible to dynamically display UI Actions through scripting or other means?

2 ACCEPTED SOLUTIONS

Juhi Poddar
Kilo Patron

Hello @ReiK 

Your understanding is correct: UI Actions in ServiceNow are not dynamically rendered in real time. Instead, they are evaluated and displayed only when the form reloads or when the record is saved/updated.

This behavior is by design, as UI Actions are server-side evaluated through their conditions and are rendered when the page is initially loaded or refreshed.

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@ReiK 

UI action are meant to be shown/hidden based on UI action condition and conditions are evaluated only once i.e. when form loads

If you wish to show/hide them based on field change then you need to use onChange client script + DOM manipulation which is not recommended in ServiceNow

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

3 REPLIES 3

Juhi Poddar
Kilo Patron

Hello @ReiK 

Your understanding is correct: UI Actions in ServiceNow are not dynamically rendered in real time. Instead, they are evaluated and displayed only when the form reloads or when the record is saved/updated.

This behavior is by design, as UI Actions are server-side evaluated through their conditions and are rendered when the page is initially loaded or refreshed.

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"

 

Thank You
Juhi Poddar

Ankur Bawiskar
Tera Patron
Tera Patron

@ReiK 

UI action are meant to be shown/hidden based on UI action condition and conditions are evaluated only once i.e. when form loads

If you wish to show/hide them based on field change then you need to use onChange client script + DOM manipulation which is not recommended in ServiceNow

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@ReiK 

Thank you for marking my response as helpful.

As per new community feature you can mark multiple response as correct.

If my response helped please mark it correct as well so that it benefits future readers.

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