Forum Discussion
Conditional column evaluation on grouped data to maintain a distinct list
You have nested each statements. That can confuse the query engine, and general advice is to use explicit calls instead of the syntax sugar.
Please...I have stated that I am trying to make something work in a language that I can use in GUI form but once we leave that realm and move to the advanced editor I am lost. Telling me I did something wrong without providing some syntax to correct it seems like trolling at this point.
What do I need to do to be able to evaluate the inner items of the grouped rows?
Again, here is my pseudocode:
The logic I want is if the rowcount is 1 then give me the empID.
If the rowcount is > 1 then give me the user empID where the status is 512
If the rowcount is > 1 and there are multiple 512 users (this case exists currently due to user error) then give me the user with the higher empID
The else then is if the rowcount is > 1 and there are no 512 users then give me the 514 user with the highest empID
Currently the inner evaluations are not happening, hence why i tried another each statement because I simply don't know what I need to do to evaluate the inner items to pick the result I am looking for. That's what I need help with!