rAuto populate list collector on a catalog item

MS12
Kilo Sage

I'm trying to auto populate a list collector for contacts on a catalog item. The contacts should be populated when the account and group field that's on the form are populated.

I have 2 issues:

1. The list collector is mapped to contact table and there is no reference qualifier on it. So as soon as the form is loaded, it is populated with values of results from contact table.

 

2. When account and group are populated, I'm calling a script include and returning all the contacts from that group to setting the value on list collector. But the list collector still keeps displaying the values that came up in step1. 

 

I have tried using  g_form.clearValue('add_users'), to clear value out the selections from list collector on load and it is not working. Any help is appreciated.

1 ACCEPTED SOLUTION

Oh sorry forgot to mention. This is technically DOM manipulation. There is a field that is not displayed on the client script. It is called Isolate script. You either have to add it to the form or you can add it to the list layout. For this client script you need to set it to false.

BrianLancaster_0-1673985387197.png

 

View solution in original post

6 REPLIES 6

Brian Lancaster
Tera Sage

Is your script that moves items in the list collector run on load? List collectors don't usually automatically have values in the selected side without a script. 

The script is run onchange of the field group. And just to clarify I'm not moving items to the selected side. I am trying to populate the Available (left) side with contacts belonging to the account and group selected on the form without the user clicking on Run Filter.

So you just want to update what is showing on the left side. Then you need to do a filter on the list collector. Check out this Guru Article.

Thank you for pointing me to the article. 

I'm having trouble with accessing the list variable and setting the value. The catalog item is being accessed via the Service Catalog on fulfiller side. So it gets into  setCollectorFilter function. But when the code hits the first line, I get an error:

 window[collectorName + 'g_filter'].reset();
        window[collectorName + 'g_filter'].setQuery(filterString);
        window[collectorName + 'acRequest'](null);

 

I have verified that the variables are correct etc but no lock.

The article is from 2010, so not sure if its still relevant. I opened a hi case. Let's see what they say.