- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 05:30 PM
I'm trying to use a UI Policy on a catalog item to make a field mandatory based on the reference variable to the sys_user table. Is this possible? Would a client script be better?
My variable is "user", and it's a reference field to the sys_user table.
I am then seeing the following in my condition builder:
but if I dot walk that to a field on the user record and set it to something that looks like it should work, it doesn't seem to apply correctly.
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 09:33 PM
please try to have if statements inside curly braces {}, like
if(region == 'NA')
{
//Your code if condition code;
}
else
{
//You else condition code;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 06:44 PM
Hi Pat - This should work without any issues.
Thanks,
Arindam

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 07:55 PM
Hi Patrick,
It's doesn't work for me either, i tried in this way:
even though field is blank it's applying the UI Policy Actions.
Can we try with catalog client script using getReference() function and see if it works,
function onChange(control, oldValue, newValue, isLoading) {
var caller = g_form.getReference('User', doAlert);
}
function doAlert(caller) {
if (caller.u_support_region == 'Americas - US and Canada'){
g_form.setMandatory('Field Name', true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 09:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2017 09:33 PM
please try to have if statements inside curly braces {}, like
if(region == 'NA')
{
//Your code if condition code;
}
else
{
//You else condition code;
}