I have a table, in which there is a column 'C' where I want to check if all values in that column match "X" or if all values match "Y" (or in between, but that's the 'else' of course).
I have some difficulty to find the correct way to do it. I got a bit stuck with using a Switch case that contain a ForAll loop that each would compare the result to "X" or "Y", but then I just loop over every item independly. I could use two counts to add 1 everytime I encounter "X" or "Y" and check if one of the two matches the amount of records in the table. But it sounds a bit much to check this.
Is there a better way to do this? Am I maybe overlooking something?
I have a table from which I want to see if all records match a certain value or not. I have 3 situations, either all record fields are 'X', all record fields do not match or all record fields are 'Y' (see image below)
In Powerapps, how can I check if all fields match 'X', or 'Y', or it does not match either.
I was thinking doing something like this, but I'm not sure if this will work:
ForAll( Filter(coll, "Value") = "X" )),
Execute code X,
ForAll( Filter(coll, "Value") = "Y" )),
Execute code Y
It's how to check if all values match 'X' or 'Y' (or else nothing happens)
The 'X' and the 'Y' are examples for strings I want to check matches on.