- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 03:29 PM
hey there and thanks in advance.
I have a record producer that I'm creating. I have a "Name" field that autopopulates with the users ID when they enter for the form. To do this I've created a variable on the record producer called "Name" and set the default value of the variable to javascript: gs.getUserID();
this is correctly populating the field.
I then need to have a UI Policy for the record producer to make 1 of 2 different questions (i.e. 1 of 2 different variables, "Question YES" and "Question NO") appear based upon the condition that one of the fields on the user record (that is now populating the Name field) is set to either YES or NO. The field on the user record that I need to govern the UI Policy is AD Domain. If the user has the value "YES" then I need one of the questions to appear, if the user has the AD Domain value of "NO" then I need the other question to appear.
I have created 2 Catalog UI Policies for the record producer called "Show Question YES" and Show Question NO" and set the catalog conditions on each to the related field "user_name.AD Domain" is YES. I then set the UI Policy Action to have the question_YES field Visible=true or question_NO field Visible=true depending on which way I want it to go.
However, this is not working. Whether the user has AD Domain set for YES or NO, it makes both the questions appear.
Is there something preventing my condition from making the UI Policy work properly?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 08:37 PM
I played around with this a bit and I don't think you can actually use the UI Policy condition on a dot-walked field on a record producer. You can still use the AD Domain variable created on the Record Producer. I would probably populated it with an onLoad client script, most likely making a GlideAjax call to do a server lookup to get the User's AD Domain field.
You could also just use a client script to do a GlideAjax call onChange of the User field and show or hide your field based on the results of that.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 05:18 PM
Hello Patrick,
You can populate the AD Domain value on the form with help of client script + GlideAjax and in the same client script once you set the AD Domain value you should be able to hide it from the form.
Once you have the field value populated you can create a UI policy against the custom field. Let me know if you have any questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 08:37 PM
I played around with this a bit and I don't think you can actually use the UI Policy condition on a dot-walked field on a record producer. You can still use the AD Domain variable created on the Record Producer. I would probably populated it with an onLoad client script, most likely making a GlideAjax call to do a server lookup to get the User's AD Domain field.
You could also just use a client script to do a GlideAjax call onChange of the User field and show or hide your field based on the results of that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 05:05 PM
I'm still having trouble. I've created a variable on the record producer "AD Domain" but am not sure how to get it to populate with the same information that the "user_name.AD_Domain" dot-walked field in my UI Policy is acting on. Once I get that field to populate it should work right? And then I understand I can use another UI Policy to hide the "AD Domain" field. So I'm just struggling with how to get this field to populate off the user name.
see what I'm missing? thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2017 05:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2017 08:22 AM
thanks everyone! I ended up using a catalog client script and script include to automatically populate the AD Domain field by pulling the info from the user record. I then used a UI Policy to hide the AD Domain field, and another UI Policy to trigger the fields. Works great!