- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 07:56 AM
Hello Experts, I have a variable set type Add Row with a variable called "Service" which is a list collector.
what i need is that if a user selects "Other" from the list collector, a field that is not in the variable set called "Additional Comments" turns mandatory. I have done this with 2 regular fields using a UI policy but not for a variable set, can you guide me on how to proceed?
Thank you
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 11:31 AM
yes, you are right in that case please revert it back to the variable set. In the run script's Execute if true field use setMandatory syntax like this.
g_form.setMandatory('variables.additional_comments', true);
Execute if false field write below
g_form.setMandatory('variables.additional_comments', false);
Regards,
Muhammad
Muhammad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 08:08 AM
Hi,
Check the below link to make the field mandatory this for your reference
https://community.servicenow.com/community?id=community_question&sys_id=71178fa9dbddc550fd63250913961983
Thanks
Chandu Telu
Please Mark ā
Correct/helpful, if applicable,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 08:29 AM
Thank you Chandu, reading this post this is for 2 variable sets, I just have one, the other is a regular text field, have you tried it this way?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 08:52 AM
Hi,
What did you try? writing an ui policy or client script? on variable set or on catalog?
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-11-2022 09:19 AM
Tried with a UI policy in the form and in the VSET with no luck, did not find the UI Actions since I'm using a variable set choice to set a variable outside the VSET mandatory.
Thank you