- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 10:41 PM
hi all,
seeing several threads on this topic, but wondering what the right solution would be.
I've got a variable on a catalog item that is only shown on a specific task. Want the variable to be mandatory if the user selects "Closed Complete" for the state.
Seems simple, but my script isn't working.
onChange client script? field I want mandatory is "approval_required". the script below is not working
anyone know the right way to achieve this? thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 11:15 PM
thanks Shishir, but I actually got it using a System UI Policy.
I was able to set the condition in the builder...and then script the setMantatory in the Script section. thanks for your help!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 11:24 PM
You can try using this in a before business rule and add the required condition in business rule.
if (current.state == 3 && current.variables.approval_required=='')
{
gs.addErrorMessage('Approval is required.');
current.state = previous_state;
}
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2018 06:39 AM
g_form works at catalog task as well, infact all the table forms.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 11:15 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2018 11:19 PM
Great. I was also trying with UI Policy but I was more looking for variable.