- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 06:33 AM
I have a script that has worked in the past for filtering a list collector based on the lookup select box selection, but not sure how to modify the script to filter a 'lookup select box' based on another lookup select box:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Type appropriate comment here, and begin script below
var filterString = "";
//Look for Application
var pf = g_form.getValue('application');
//Concat to filter u_platform=cba
if(pf != "") filterString += "^u_platform="+pf;
else if(pf != "") filterString = "u_platform="+pf ;
var roleCat= 'role_cat';
window[roleCat + 'g_filter'].reset();
window[roleCat + 'g_filter'].setQuery(filterString);
window[roleCat + 'acRequest'](null);
}
When user selects the 'application', the second lookup select box should only show those values associated with that application:
First field in the form: application (column name in the table is 'u_platform')
Second field on the form I need to filter: role_cat
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 07:43 AM
Hi,
To bind first variable use
For dependent filed use Reference qual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 07:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 09:06 AM
I don't have any experience with Reference Qualifiers. Can you provide more detail on how to set up?
1st variable - application (u_platform in the table)
2nd variable (dependent on selection of the 1st) - role_cat (u_track in the table)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2018 10:03 AM
Hi,
I am assuming
1. Table A having columns
1. Plateform
2. Track
Now as per your scenario
1. Variable application should have all values of column Plateform
2. Depending on selection of application variable role_cat list should fill.
Non on SNC catalog form:
1. Add a variable
2. Create 2nd dependent variable
Hope this will help you.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2018 09:54 AM
The reference qualifier field is not available for a Lookup Select Box. Do you have to modify a UI Policy to get it to show up?