Hi,
It seems there is a bug that prevents you from having a collect function inside of switch statement inside of a if statement inside of a forall, but only if your if statement has an else condition...
This code gives an error:
ForAll(galInsertedControls.AllItems, If(true, Switch(true, true, Collect(colTempJSON, true)), true));
This code doesn't:
ForAll(galInsertedControls.AllItems, If(true, Switch(true, true, Collect(colTempJSON, true))));
The only difference is I don't have an else section on my If statement.
You can swap the if and switch statement so that the if statement is inside of the switch instead but there is not difference to the result.
I just tried this with just nested if statements instead of a switch and appear to get the same result...
Is this a bug?