Displaying UI Action based on the value in fields

ramwons
Kilo Expert

Hello SN Comm,

I have a UI Action which needs to be displayed only when there is a value in 2 fields ie Point 1 & Point 2 (without saving the form). If these fields are empty then the

UI action   should not be displayed.

I have set the UI Policy like in the attachments. But the button is always displaying in the form irrespective of the value in the fields.

Please check and let me know if I'm doing wrong.

Best Regards,

Ram

1 ACCEPTED SOLUTION

I followed the below thread and it is working. Thanks for your response



https://community.servicenow.com/thread/260813


View solution in original post

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Ram,



Why to have ui policy and use DOM to hide the UI Action. You can achieve this in the condition field of UI Action.


If condition evaluates to true then button shown if false then hidden. Also you can decide when to show the button for insert i.e. new record or update i.e. existing record.



Condition: current.u_point1 != '' && current.u_point2 != ''



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Harish KM
Kilo Patron
Kilo Patron

you can add a condition in UI action like current.point!='' && current.point!=''


Regards
Harish

Hello Guys,


I'm new. I'm following the thread - How to hide UI Action based on field change in form without using DOM?




Like you said the condition is working. In order the display the button I have to save the form after entering the value in the fields


Is it not possible in anyway we can make the button to be displayed immediatly the value is entered in the field




Best Regards,


Ram


Hi Ram,



No that is not possible. The main purpose of UI Action is allow user to perform some update without giving access to the fields.


Any how the UI action will be shown when both the fields are having the values.



Regards


Ankur


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