remove option from a list collector on a record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2019 11:56 PM
Hi,
I have a requirement on a record producer to remove certain options when another variable choice is selected above. e.g. if subcategory is "lease", then remove option "other" in the list collector.
I have tried a catalog client script but i can't get it to work. This is onChange of the subcategory variable:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue== 'Lease') {
g_form.removeOption('u_type', 'Other');
}
Can anyone help?
Many thanks
M
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2024 05:10 AM
To remove certain options when another variable choice is selected in Record Producer, follow these steps:
1. Go to Subcategory variable, and under Type Specification tab use "Reference qual" field
2. Write query:
javascript: new script_include_name().method_name(current.variables.subcategory + "");​
3. Create script include and method to be called from Reference qual, and check if subcategory is "lease" then return query that will remove "other" from list collector. (If you are facing difficulty in writing query, I can help you there)
4. Click on Save button to save the changes on variable and script include.
Attaching example of reference qual.
Thanks,
Shivanshu