Dell,
I have tried your method, it is saying a missing ), then a do statement. I have altered it by the below and it executed without any errors but, when i selected multiple values it is saying failed to bring data. In the Sql i have Where State In {?State}
NumberVar i := 1;
StringVar result := '';
while i < UBound({?State}) do
(
if i = 1 then
result := cstr({?State}[i], "0");
;
result := result + ',' + cstr({?State}[i], "0");
i := i + 1;
)