Using IF on default value

@lauren.gus ,@justin
I have two Queries:
SELECT Publisher FROM MP_PUBLISHER WHERE E_P = 1 and SELECT Publisher FROM MP_PUBLISHER WHERE V_P = 1
i would like to switch the default value of a multiselector component select3 to either of the queries based on a selection on News type dropdown. if Editorial Priority then run query one else the second one.

would an if statement work on the default are of select 3 if yes, how should i implement it?

current state : ({{select4.selectedIndex}} == 1 ? {{query5.data.Publisher}}: {{query6.data.Publisher}})

Yea that should work - but put all your logic inside the {{ brackets, eg

{{ (select4.selectedIndex === 1) ? query5.data.publisher : query6.data.publisher }}

2 Likes