using a condition builder for a UI Policy to dot walk a reference field

patricklatella
Mega Sage

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:

find_real_file.png

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.

find_real_file.png

1 ACCEPTED SOLUTION

please try to have if statements inside curly braces {}, like



if(region == 'NA')


{


//Your code if condition code;


}


else


{


//You else condition code;


}


View solution in original post

14 REPLIES 14

patricklatella
Mega Sage

perfect, that's it....thanks!


The SN Nerd
Giga Sage
Giga Sage

Dot walking will only work if the dot-walked field is present on the form.



This is by design.



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

For such instances I find the most helpful approach is to include the dot-walked field on the form but then to make it invisible (unless it is wished to show it of course) - just so it can be used in UI policies.

patricklatella
Mega Sage

dan.bruhn...for some reason I'm not seeing the "Correct Answer" buttons on certain threads of mine.   This just started a week or so ago.  


Hi Patrick,



If you are viewing discussions from your inbox the correct answer button will not show up.   Can you take a look at How To Mark Answers Correct From Community Inbox and see if that is the issue?   If you still can't see the correct answer button please let me know.   It would help us troubleshoot if you can provide a few links to ones you cannot see the correct answer button.



Thanks,