I’m working on an app and I’m using the :group by feature to create a leaderboard-style repeating group. I have a data table called Orders, and a data table called Users. The “Orders” table has a few separate fields that are connected user fields (one to one, not a list), depending on the role/task the user has in that order. The two I’m concerned about for this problem are called Analyst Responsible and Senior Appraiser. So just to reiterate, those are both fields in the Orders table that are type connected user.
As I’m creating the leaderboard, I want to show the top performers for my company in terms of the number of orders where they have been tagged in one of the applicable roles (either Analyst Responsible or Senior Appraiser). I can figure out how to group, count, and display based on just one of the fields. Here it is for Analyst Responsible:
This is working well. However, I want it to count and sort based on whether the user has been tagged in the field analyst responsible or senior appraiser.
Is there a better way to do this? Adding another grouping wouldn’t work from what I’ve seen.
Just do a search with the user as the constraint against the field analyst, then use merge operator and do another search with the user as constraint against the senior appraiser field.
Thanks for the reply! I appreciate the help. Unfortunately, I don’t think that will work unless I’m misunderstanding. I don’t know what I can do as the expression to constrain against the analyst or senior appraiser field. The leaderboard will display every user ranked in terms of how many orders they’ve completed, either as the analyst or as the senior appraiser, which makes me think I need to use the :group by function.
I tried what you said, but I hit a dead end here because I can’t constrain either of those fields by a specific user since I want to display it for all of the users, if that makes sense.
Sounds like you could follow the merge with advice and then after use the group by operator and then group by user and aggregate by count…that might work