Enable/Disable a button on the form based on a condition

irfanshaik
Tera Contributor

Hi Team,

 

How can i disable a button on a form that i created using UI Action when one of the field's in a form has a certain value. For example - 

 

irfanshaik_0-1707971237486.png


If i want to Disable the button "Email" if "Col1" (col1) has a value of 5 and have it enabled for any other value of "Col1", how can i achieve that.

 

Thanks.

2 ACCEPTED SOLUTIONS

Aman Kumar S
Kilo Patron

Hi @irfanshaik 

You can just put in the condition field in the UI action.

current.getValue("col1") != 5

But remember this is not real time, once you have the value populated on the page load the decision will happen, not in real time ie the value of 5 should be present when the form loads.

Best Regards
Aman Kumar

View solution in original post

Amit Pandey
Kilo Sage

Hi @irfanshaik 

 

Please refer to the below screenshot-

 

AmitPandey_0-1707973554368.png


current.getValue("col1") != '5';

 

Please mark my answer helpful and correct.

 

Regards,

Amit

View solution in original post

6 REPLIES 6

Sumanth16
Kilo Patron

Hi, 

 

In the "Email" UI Action on your custom table add the below condition

current.getValue(col1)!='5'

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,
Sumanth meda

Amit Pandey
Kilo Sage

Hi @irfanshaik 

 

Please refer to the below screenshot-

 

AmitPandey_0-1707973554368.png


current.getValue("col1") != '5';

 

Please mark my answer helpful and correct.

 

Regards,

Amit