Requirement to populate List Collector choices depending on other variable selection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 02:45 AM
Requirement:
I have a catalog item form having two variables.
1) Region(backend - region): Select Box
2) Area (backend - area): List Collector - referencing table u_area (explained below)
I have a custom table Area(u_area) having 2 columns
1) Area(backend - u_area)
2) Region(backend - u_region) - These region names are fed in the select box Region I mentioned above as it's select box choices.
Now, in this table u_area, for a singl Region value (for e.g., CA42), there are multiple area as individual table records.
Region: CA42
Area records: CAAK, CAAV, CACC, CACH, CACS, CADH, CAGB, CAGR, CAGV, CAMB, CARG, CASM
Requirement is:
On the catalog item request form, depending on the choice of Region variable, respective area choices should be fed to the Area variable.
How can I achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2023 04:05 AM
You need to create a script include which can query and filter the response received from the u_area table based on the region being provided as an input from an On-Change client script on region field. Whenever the user will change the value of region field, the script include will query the u_area table for records where the region is the region provided as an input. The response received can then be filtered out to get the areas as an array which could be deserialized in the client script and can be passed on to the list collector field.
Thanks & Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.