cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AJ_vizMan
Helper V
Helper V

Help Desk (Modified) App - Need to filter items for admin on basis of Ticket Sub - Category and admin person part of 2 different admin Groups

Hi, I have modified 'Help Desk' app to use for users to submit tickets after selecting Category, Sub Category, Attachment and description -

There are 2 admin teams who work on the tickets and they should see tickets on the basis of Ticket Sub-category  e.g.

member of Team 1 should see only 'Sub-category A' ticket only
And member of Team 2 should see 'Sub Category B' ticket only 

 

For this i have created 2 collections for Sub-categories and 2 separate collection for Admin team (Team 1, Team 2) and using below formula 
If(isAdmin,
Sort(Filter(AllTickets,
If(MyProfile.Mail in AdminGroup1 && SubCategories in SubcategoryA, Sort(Filter(AllTickets,Created,Descending)),
(MyProfile.Mail in AdminGroup2 && SubCategories in SubCategoryB, Sort(Filter(AllTickets,Created,Descending)))))),
Sort(Filter(AllTickets,Author.Email = MyProfile.Mail || Author.Claims = MyProfile.UserPrincipalName),Created,Descending))

I have no clue why it's not working. May be there is silly mistake. Please help

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @AJ_vizMan .

 

Since you mentioned that they are not separate collections, I need know the details about those collections. Please share the creating formulas of the collections.

 

You could also try below formula first:

If(isAdmin,
   If(MyProfile.Mail in COE_CW_Admin.AdminGroup1,
      Sort(Filter(AllTickets,SubCategories in COE_CW_Tickets.SubcategoryA),Created,Descending),
      MyProfile.Mail in COE_CW_Admin.AdminGroup2,
      Sort(Filter(AllTickets,SubCategories in COE_CW_Tickets.SubcategoryB),Created,Descending)
   ),
   Sort(Filter(AllTickets,Author.Email = MyProfile.Mail || Author.Claims = MyProfile.UserPrincipalName),Created,Descending)
)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-jefferni
Community Support
Community Support

Hi @AJ_vizMan ,

 

Please try:

If(isAdmin,
   If(MyProfile.Mail in AdminGroup1,
      Sort(Filter(AllTickets,SubCategories in SubcategoryA),Created,Descending),
      MyProfile.Mail in AdminGroup2,
      Sort(Filter(AllTickets,SubCategories in SubcategoryB),Created,Descending)
   ),
   Sort(Filter(AllTickets,Author.Email = MyProfile.Mail || Author.Claims = MyProfile.UserPrincipalName),Created,Descending)
)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

AJ_vizMan
Helper V
Helper V

Hi @v-jefferni - Thank you for your answer. Above formula  result in an error but,  can't see any of the filtered ticket.
Sharing few more details -
AdminGroup1 and AdminGroup2 are part of collection in app, same with SubCategoryA and SubCategoryB.
Using Sharepoint as data source. and displaying tickets on cards. You can refer attached screenshot.

 

Looking for your response.

Hi @AJ_vizMan .

 

Since you mentioned that they are not separate collections, I need know the details about those collections. Please share the creating formulas of the collections.

 

You could also try below formula first:

If(isAdmin,
   If(MyProfile.Mail in COE_CW_Admin.AdminGroup1,
      Sort(Filter(AllTickets,SubCategories in COE_CW_Tickets.SubcategoryA),Created,Descending),
      MyProfile.Mail in COE_CW_Admin.AdminGroup2,
      Sort(Filter(AllTickets,SubCategories in COE_CW_Tickets.SubcategoryB),Created,Descending)
   ),
   Sort(Filter(AllTickets,Author.Email = MyProfile.Mail || Author.Claims = MyProfile.UserPrincipalName),Created,Descending)
)

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Hey @v-jefferni - Thank you so much for the solution. I had little tweaked it, using 'Categories' as 'Categories.value' in above formula works fine 🙂
You saved me as this was the only problem preventing to share the app with admin team. You made my day, thank you!!

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,319)