Reference Qualifier on Variable Set based on Variable on the record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2019 12:35 AM
Hi All,
I have a record producer with few variables and a variable set. A variable named 'Client name' is created as a variable and the Variable set has Policy details.
Requirement is - based on the Client name selected in the 'Client name' field, the policy type and policy number should be filtered. I have tried writing a catalog client script on the variable set; however Variable on the form is not available to write Onchange/ Onload while writing the script on variable set. Any help on this is much appreciated.
- Labels:
-
Customer Service Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2023 02:32 AM
How was this issue resolved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 04:49 AM - edited 11-04-2024 04:51 AM
I had a similar use case where I had a field on the record producer itself called "Region" and then a reference field on the multirow variable set called "Location" which was supposed to be filtered based on the users selection on the "Region" field.
I solved it by adding an additional field on the multirow variable set to hold the same value as the "Region" field. Then I populated this value and hid it (as it did not need to be visible) using an onLoad "Catalog client script" on the variable set like this:
function onLoad() {
if (g_service_catalog.parent.getValue('region')) {
g_form.setValue('region_mrvs', g_service_catalog.parent.getValue('region')); // Set value based on "Region" field on the main record producer
g_form.setDisplay('region_mrvs', 'false'); // Hide field
}
}
Then I used an advanced reference qualifier to filter the "Location" field on the multirow variable set based on this new, hidden "region_mrvs" field:
javascript: "region=" + current.variables.region_mrvs;
I saw this was an old thread, but maybe it can help someone else 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2024 05:39 AM
This article details a way to do the same without creating and mostly hiding another variable