Hello all,
I'm trying to create 2 dropdowns where the 1st dropdown will show the unique manufacturer brands from this table.
I managed to do it, but the 2nd dropdown is to get the motorcycle models based on the selected manufacturer. The catch is I need to only make a single query. What I did is I created a query rule then saved it to a local variable. On the 1st dropdown, I used union function to get the unique manufacturers from the local variable containing the query. However, I'm having a hard time on the 2nd dropdown.
Discussion posts and replies are publicly visible
The following code snippet should get you started.
a!localVariables( local!data: { a!map(model: "PCX", make: "Honda"), a!map(model: "GSX", make: "Honda"), a!map(model: "Avenis", make: "Suzuki"), a!map(model: "ADV", make: "Honda"), a!map(model: "Thruxton", make: "Suzuki"), }, index( local!data, wherecontains( "Honda", local!data.make ) ) )