How can i get this to work? Trying to use @trade inside {{multiselecTrades.value[@trade]}}
DECLARE @count2 INT;
DECLARE @trade INT;
SET @trade = 0;
SET @count2 = ({{multiselectTrades.value.length}});
WHILE @count2 >0
Begin
INSERT INTO
leadTrades(
LeadId,
TradeTypeId)
Values (@leadId,{{multiselectTrades.value[@trade]}})
SET @trade = @trade + 1;
SET @count2 = @count2 -1;
END
Hmm I’m not sure this is possible, but I wonder if there’s another way we can do this type of looping. Are you basically trying to run this query for each value selected in the multiselect component?