Is there a way to do a UI Policy to show fields based on the values of a list collector value

Cupcake
Mega Guru

I have a form where one variable is a list collector and I want to show two other variables ONLY if the list collector value contain *23. I tried this via a UI Policy but it doesn't appear to be working.

Any ideas?

find_real_file.png

find_real_file.png

 

Thanks,

Karen

1 ACCEPTED SOLUTION

Shane J
Tera Guru

List Collector is a reference field, so I believe you'd need to looking for sys_ids instead of what I'm guessing is a "Name".

View solution in original post

4 REPLIES 4

Shane J
Tera Guru

List Collector is a reference field, so I believe you'd need to looking for sys_ids instead of what I'm guessing is a "Name".

Tried setting it up in my Developer instance and the value for the contains piece keeps clearing itself out.  Hmmm.

Shane I used the sysid and it worked like a charm.

Thanks for that.

 

Have a great rest of your week.

Karen

Shane J
Tera Guru

I was able to do this in a client script, hopefully you can use this to meet your needs:

 

function onLoad() {
   //Type appropriate comment here, and begin script below
   
	var list = g_form.getValue('u_list_test1');
	var n = list.includes("a8f98bb0eb32010045e1a5115206fe3a");  //does it include User:  Abe Lincoln
	
	if (n == true){
		g_form.setMandatory('description', true);
	}
	else{
		g_form.setMandatory('description', false);
	}
}