How to filter a variable based on another variable

poornima batchu
Tera Expert

Hi all, 

I created two variables on catalog item.

1. country_name which is a reference type of hr_Country table

2. Entity_name which is a reference type of hr_entity table.

hr_entity table has a country field which is a reference type of hr_country table. On portal I wanted to show only entity name values based on the country selected in the country name variable.

Let's in the country_name variable if user has selected India, then in the entity_name variable it should only the India country entity_names.

How to achieve this

1 ACCEPTED SOLUTION

poornima batchu
Tera Expert

Using this script in the reference qualifier of entity_name variable I'm able to achieve this

javascript: 'u_country=' + current.variables.country_name  // Here 'u_country+' is the value of the field that links both the table. In my scenario u_country is the field that links the hr_Country table and hr_entity table.

View solution in original post

5 REPLIES 5

poornima batchu
Tera Expert

Using this script in the reference qualifier of entity_name variable I'm able to achieve this

javascript: 'u_country=' + current.variables.country_name  // Here 'u_country+' is the value of the field that links both the table. In my scenario u_country is the field that links the hr_Country table and hr_entity table.