Problem with UI Policy on List type field.

dalewechsler
Mega Expert

I thought this was going to be simple - I created a multi-select list field and configured a few choices to get started, including Other. I simply want a string field to appear (and be mandatory) if "Other" is among the choices selected in the list field, and for the field to not be visible if "Other" is not included as a choice.

When I go to set the condition ("x" Contains "y") I can type in "Other" but it disappears when I save it. Also, when I click the magnifying glass to search for the choices I get an error - see screenshot:

UIPolicyConditionsError.png

I tried changing the table in the UI Policy to Choice (sys-choice) but then the field isn't available. I think this has been asked, but the latest suggestion on that thread was to try a client script. I couldn't get that to work either. Anybody else come across this problem in a multi-select list field on a form? This is on the Change Task form.

Thanks!

1 ACCEPTED SOLUTION

dalewechsler
Mega Expert

I got this to work two ways. Both have drawbacks, but they work (ish). With a UI Policy I got the error mention in the OP because the choices in a list field are stored on the Choice table. So, I tried referencing the change task table which worked, but the functionality changed. I wanted these fields to have a Choice pulldown with None (that I will configure to actually display "-- Select one or more --"). Also, I need to be able to give a group of users access to configure choices and add to list. Using this method, it looks like I'll need to give access to the table for the group. Here are some screenshots that help explain:



Here's the reference section:


ChoiceRef.jpg


Here's the result:



ChoiceRef2.jpg




This is clunky compared to how the other fields work that don't have to have "Other" as a choice with a conditional string field. But this did work in that when I went to configure the UI policy for "Other" and configure the condition: "Destination Group Name contains Other" - Other was there as a choice. But couldn't get the UI policy to actually work yet (problem for another day). Also, when I imitated a user who will be adding these values, clicking on the search icon returned a security error, so will have to provide access to this table - more complexity.




Compared to: (this is how the other fields work)


This way is much easier to add multiples and add new values - and no access issues other than giving Personalize choices on field level and Create on Choice table.


regularchoicevschoiceref.jpg





I ultimately resorted to a client script (one for each field that has Other) and it works very well without having to give access to table for the group that will be adding values or have two fields that function differently than the rest. I just have to remember to change the scripts if the field names change.


View solution in original post

5 REPLIES 5

aswinsiddaling2
Kilo Guru

Can you dot walk to Source Group Name and select the name field instead? Let me know if it works


Thanks Aswin- yeah, tried that. It didn't work. The problem seems to be because the choices for a list field are on a different table - i.e. Choice (sys_choice). See below for more on that.


randrews
Tera Guru

ok that is interesting never seen that.. it probrably has to do with how Source group name field is defined.. it looks like you have defined it as a ref/select box off of change_task.u_source   do you HAVE a u_source field on the change task table... we keep ours on task.


It is a list field with choice pulldown with None. There are several fields with this configuration - I just used this one as an example - trying to do the same with all these fields. I think the problem is that the choices are on a different table. I tried a couple of things - both worked - but the one that worked best, unfortunately, is a client script. I was hoping for a simpler solution. See below.