- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 08:59 PM
I have two fields on catalog form, state and country. Both are referring to different tables and states record has a field referring to country table.
So when we select a country then its associated states values should be visible in the states dropdown field.
How to achieve this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:28 PM - edited 08-20-2024 09:29 PM
Hi @rohitreddy
Assuming you have two lookup select box variables for Country and State respectively, you need to make use of the below Advanced Reference Qualifier in the State field to populate State based on country :
javascript:"country="+current.variables.country.getDisplayValue(); //Assuming country is the name of the Country variable.
Output :
Thanks and Regards
Amit Verma
Amit Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:28 PM - edited 08-20-2024 09:29 PM
Hi @rohitreddy
Assuming you have two lookup select box variables for Country and State respectively, you need to make use of the below Advanced Reference Qualifier in the State field to populate State based on country :
javascript:"country="+current.variables.country.getDisplayValue(); //Assuming country is the name of the Country variable.
Output :
Thanks and Regards
Amit Verma
Amit Verma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 10:40 AM - edited 08-21-2024 10:49 AM
Hi @vermaamit16 ,
I tried with your solution but this did not work. Please see the snap attached;
javascript:"country="+current.variables.u_country.getDisplayValue();
country field on the catalog form is of Reference type.
u_country is backend name of country field on state table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2024 11:18 AM
Hi @vermaamit16 ,
I tried below and it worked.
javascript: "u_country=" + current.variables.country;
Thank you for your suggestion.
