How to make Variables in Catalog item Dependent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 09:30 AM
I have two variables 'Model' with more than 50 choice list values, and another values as 'Spare Part' with more than 200 choice list values need to make Spare Part field dependent on the value selected in Model Field.
I know a way of doing this by client script using Add option, clear option, but as there are numerous values are there so is there any other way by which i can achieve this?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-01-2022 06:28 AM
Hello All.......I have been scouring the community for a solution to my issue but havent come across a scenario here yet that is similar to mine.
I have a catalog item(not record producer) form on the frontend and within this form i have variable set which contains all the variables needed. I have 4 of the variables which are dependent of each other (well that is what i am trying to achieve)
To try and achieve this i have created a table (location_2) which extends the location table. So i setup the fields as below.
u_site_type - Choice - (Site A, Site B, Site C) - Note: This could be a dot walked field as it needs information from the related location but not a big deal for now
u_device_type - Choice - Dependent on Site type
u_comms_type - Choice - Dependent on device type
u_product_type - Choice - Dependent on Comms type.
On the frontend form i have setup These same fields as below
Site - Reference - Location table
site_type - select box - (Client script created to populate this field based on location)
device_type - lookup select box- Dependent on Site type (This is working with below config)
Lookup from table: location_2
Lookup Value field: u_site_type
Lookup Label fields: u_device_type
Reference qualifier: javascript:'u_site_type ='+current.variables.site_type
Variable Attributes: ref_qual_elements=site_type
When trying to do the same for below fields it does not seem to work.
comms_type - select box- Dependent on device_type
product_type - select box - Dependent on comms_type.
I have been playing around with this for a while and every solution i have tried does not seem to work and most solutions only reference to 2 variables being dependent where i have 4.