Thanks for the replies everyone! The sample logic works exactly as I needed! In porting it, everything works when all fields are all in the same group.
How would I need to alter *[local-name(.) = field2] to explicitly define a group to check for a field that matches the value of "field2"? In my case, field2, field5, and field1/3/4 are in different groups on the same data connection.
My connection layout using your example fields:
-
ui (group)
-
field2
-
QAItemCounts (group)