Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

UI action validate based on the field

XYD23
Tera Contributor

I have two UI actions on the incident form, I need to validate that filed is not blank.

I tried to do this by adding the current.filed_name != ''; in the condition of the ui action
if the field value is blank the ui actions are not visible on the form(working).
If I tried to put some value on the filed again the ui actions are not visible on the form(Not working),

can anyone help me on this?

6 REPLIES 6

Maddysunil
Kilo Sage

@XYD23 

Can you check with this :

 

current.field_name.nil() // Check if the field is not empty or null

 

Kindly mark helpful/accepted if it helps you.

Thanks

XYD23
Tera Contributor

Even if it empty I'm able to see the ui actions

Vrushali11
Tera Contributor

Hello @XYD23 

Please try below condition,

current.description.nil() == false;

 

Thanks & Regrds,

Vrushali

XYD23
Tera Contributor

no If I tried to put the value in that field, I cant see the ui actions.