- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 03:20 AM
I have some fields of a table which I want to be mandatory under certain conditions only.
To do this on a form, I can write a client script which does g_form.setMandatory or I can write a UI Policy.
What about if I want to do this on a list? What is the best practice for making fields conditionally mandatory so that list edits will fail if the conditionally-mandatory fields are blank?
Concrete example: I want the Department field to be mandatory if the Company field is filled in on the Users table. If Company is blank, then Department can be blank too. If I set this up on the form, the policy can be avoided by editing using the list editor instead of the form.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 06:28 AM
You can try adding gs.isInteractive condition in your script and that should do the job for you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 03:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 06:06 AM
I will try that but I'm aware business rules would affect more than just the list editor. I agree this does seem to be the most robust solution but is there anything that will work on lists but not, say, import sets or other background work?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 06:28 AM
You can try adding gs.isInteractive condition in your script and that should do the job for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 06:41 AM
Yes, that would do it - thanks!