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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2010 10:53 AM
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?
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2010 11:18 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2010 11:21 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2010 11:33 AM
Yeah. Just move the condition into an 'if' statement inside of your 'onLoad' function. That field should be removed from the form.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2010 11:51 AM
Easy enough - thanks for the help, Mark.