UI Action

hadron_collider
Tera Contributor

Hi!

 

I am trying to create a functionality for a button 'reject': when clicked a "reason" field should appear (and is mandatory).

Then when I click again, the "amount" field should be set to 0, and if the field "reason" is empty I should have an error message.

 

 

Here is my current script that does not work:

kata90_0-1702464471496.png

 

 

 

 

kata90_1-1702464672262.png

 

 

 

4 REPLIES 4

Community Alums
Not applicable

Hi @hadron_collider ,

Whatever, you are trying to achieve using UI action can be done using UI Policy.

 

Ankur Bawiskar
Tera Patron
Tera Patron

@hadron_collider 

I agree with Sandeep to use UI policy.

You are showing the field on click of UI action so user would not have entered anything prior to this so it makes no point in making it mandatory on UI action click

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

the point is: the record can be rejected only when 'reason' field is filled in. 

Community Alums
Not applicable

Hi @hadron_collider ,

Then write a Onchange Client Script with your conditions.