Hi. This may have a simple answer but I’m having a hard time trying to figure this out.
There are different departments in my app. If current user is the admin of the IT Department. I want to count the number of users who belong to the IT Department and “Submitted” their report.
I’ve tried this expression:
Do a search for Reports:count
Constraint - Status: “Submitted” & Created by: Current User’s Department
Hi there, @christianbernliboon… the “Submitted” constraint seems simple enough, but if I understand your post correctly, shouldn’t the second constraint be something like
This Report's Creator's Department is Current User's Department? If so, it seems like an advanced filter is going to be the way to go there.
Hope this helps.
Hi @mikeloc, thank you for your response. I’ve tried to this Search expression:
Search for Reports:filtered:count
Constraint: Status = Submitted
Filter: Advance: Search for Users
Constraint: Department = Current User’s Department
But I’m getting this issue
How are your data-types organized? Specifically the reports data-type relative to your user’s date type?
I don’t think you need to do a search for users in the advanced filter… you should be able to configure the expression exactly as I have it in my initial response. Or did you try that already and you weren’t able to configure that expression?
@care1 In my User’s data type, it doesn’t have a field that relates to Reports.
@mikeloc I wasn’t able to configure with the initial expression. I was finally able to solve it using the intersect.
Search for Reports (Constraint: Status: Submitted) intersect with Search for Reports's Creator:filtered:count (Constraint: Department = Current Department Head
Hello, to anyone who reads this post. I have a follow up query regarding this. How would I translate this to a Repeating Group? Wherein I would only show the list of reports submitted by people of a certain department.