Condition/OnClick field on a client script for a record producer

Jason Stephens
Kilo Guru

I am trying to run a client script ONLY if a field on my form (caller_id) is not empty. Otherwise, I do not want it to run. I would assume I could put caller_id!='' in the condition/OnClick field to accomplish this, but it doesn't work. Why doesn't this work?

14 REPLIES 14

Mark Stanger
Giga Sage

Client scripts don't have 'condition/onClick'. They only run onLoad, onChange, or onSubmit. Are you sure you're talking about a client script or are you talking about a UI Action?

If you're talking about a UI action then you would need to return false if the condition isn't met since the action would actually be running like an 'onSubmit' script.


So I guess even though the field is available, I can't use it... I guess that explains why it don't work... 🙂


Yeah. Just move the condition into an 'if' statement inside of your 'onLoad' function. That field should be removed from the form.


Easy enough - thanks for the help, Mark.