How to populate list collector based on other field value?

Community Alums
Not applicable

I have Lookup Select Box for selecting location. Name is located_at.

I want to populate list collector(Name is select_user) with Users who have location selected from above Lookup Select Box. Can anyone help me with this?

I have tried reference qualifier: javascript: 'location.name='+current.variables.located_at

Also tried below onchange client script:

function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

//Type appropriate comment here, and begin script below
select_userg_filter.reset();
select_userg_filter.setQuery('location=' + newValue);
select_useracRequest(null);
}

But nothing helped me to achieve this.

1 ACCEPTED SOLUTION

Hi Sindhu,

Make below changes,

reference qualifier: javascript: 'location.name='+current.variables.located_at;

Variable attributes:ref_qual_elements=located_at

View solution in original post

4 REPLIES 4

Shweta KHAJAPUR
Tera Guru

Hi,

Try below code,

 

var collectorName = 'select_user';


window[collectorName + 'g_filter'].reset();
window[collectorName + 'g_filter'].setQuery('location.name=' + newValue);
window[collectorName + 'acRequest'](null);

Community Alums
Not applicable

Hi Shweta,

 

Above code is working, but can't we do it through reference qualifier instead of client script?

 

Regards,

Sindhuja.

Hi Sindhu,

Just add below attribute in your list collector, Also refer below screenshot

ref_qual_elements=located_at

 

find_real_file.png

 

 

Hi Sindhu,

Make below changes,

reference qualifier: javascript: 'location.name='+current.variables.located_at;

Variable attributes:ref_qual_elements=located_at