Validating certain fields in a form when a user clicks a form button
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2014 01:37 PM
I am working on a change ticket form with two form buttons which are "Submit" and "Request Approval". Submit is a way of inserting the record in the table.However the ticket will only move forward when the user presses "Request Approval".
I want to impose certain restrictions ONLY when a user clicks on "Request Approval" . By restrictions I meaning prompting the user to fill the Planned Start Date , End Date. However no such message should appear when a user clicks on Submit.
One way of doing it is to put in a condition for visiblity through a UI action. But I want the button to visible at all times. Please help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2014 02:37 PM
You could run a client side check in the Request Approval ui action to make sure those fields have values, and then submit the form.
» How to Execute Client Script and Business Rule Script in One UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2014 06:49 AM
Thanks for the reply !! Executing partially on client and partially on server always help. The validation is working But for some reason when I go ahead with request approval , I get an "Actional NOT authorized " error message. I guess that usually happens when you there is a discrepancy in the conditions. I cant figure out any issue here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2014 07:44 AM
"Action not authorized" sounds like you click the UI Action using the list view and not the form view, correct?
If that is the case, then the condition of the UI Action is not satisfied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2014 01:32 AM
Greetings,
Make sure you have giving some name to UI Action and calling the same in script
gsftSubmit(null, g_form.getFormElement(), '<button_action_name>'); //MUST call the 'Action name' set in this UI Action
Let me know if that's work for you.
Regards,
Solutioner
Enhance Knowledge NOW@ www.solutioningnow.com