- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 01:40 AM
Hi All,
I have two list collector variables(countries,sites) on the catalog form/portal from.
I need to populate related sites based on the countries selection.
I have written onchange client script which is working if I select only one country. If i select multiple countries below is not displaying all the sites of those countries.
var collectorName = 'site';
var filterString = 'u_country=' +newValue;
try{
g_form.setValue(collectorName, '');
var myListCollector = g_list.get(collectorName);
myListCollector.reset();
myListCollector.setQuery(filterString);
}
catch(e){
window[collectorName + 'g_filter'].reset();
window[collectorName + 'g_filter'].setQuery(filterString);
window[collectorName + 'acRequest'](null);
}
please suggest
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 01:48 AM
try changing your filter string to the below
var filterString = 'u_countryIN' +newValue;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 03:04 AM
Ok i would probably still advise following the method described above but it might be worth opening a new thread to see if anyone else has a more effective way of doing it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2019 03:35 AM
Thanks for your inputs. I will open a new thread for this