'Contains' or 'Starts with' doesn't work with UI Policy for Reference fields

Shane J
Tera Guru

I'd like to get some verification that operators 'contains' or 'starts with' do not work for Reference Fields.   I am trying to get a simple String field to show/hide based on UI Policy and the Reference fields used in the condition are not causing that to change.

My best guess is that SN is trying to find if the sys_id contains or starts with the value provided - which couldn't possibly be any less helpful.

4 REPLIES 4

ahaz86
Mega Guru

can you do reference_field.name contains?


kannann_
Kilo Expert

Hello Jued,



For example if you are using Division Contains "anything" in your condition then try the below method.


Use the last option "Show Related fields" in the drop down of the condition in the UI Policy and select your Division : Division Fields.


Now, again if you select the dropdown it should show you all the fields of the Division Table. Select Name in it and then just use Contains "Anything"


ghsrikanth
Tera Guru

HI Jued,



I have tried to create a UI policy with CONTAINS on reference field and able to save the UI policy.


Screen Shot 2016-03-10 at 8.03.03 PM.png



You can follow the suggestion of Kannan to get to the specific value in the reference columns. It is easy and advisable.


If you need control over the returning you can go for Assigned To Contains javascript:getAssignedUsers() // this returns the sys_ids (i prefer this as this gives me entire control in script which i can play around as I want)



Please let us know your requirement, may some one of us can help you.




Mark if it is helpful or correct, feedback is appreciated


scottrgray
Kilo Contributor

I have the same issue...



This works:


1.png


This does not work:


2.png



I really want to get the second option to work, as it allows for future use (new project groups, etc). Any ideas?