web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter tickets in gall...
Power Apps
Unanswered

Filter tickets in gallery on basis of search box text value

(0) ShareShare
ReportReport
Posted on by

Hi, have designed a powerapps in which filtration of tickets is on the basis of ticket "sub category". And there are 2 admin teams who work on the tickets and can see the tickets belong to their Sub category.

 

Now, have to filter the tickets on the basis of ticket id using search box. But, i have no thoughts how to achieve it.

 

Formula used to filter items in Gallery :
If(isAdmin,
If(MyProfile.Mail in COE_CW_Admin,
Sort(Filter(AllTickets, SubCategory in MDTeam_SubCategory),Created,Descending),
MyProfile.Mail in COE_SF_Admin,
Sort(Filter(AllTickets, SubCategory in CoETeam_SubCategory),Created,Descending)
),
Sort(Filter(AllTickets,'Created By'.Email = MyProfile.Mail || 'Created By'.Claims = MyProfile.UserPrincipalName),Created,Descending)
)

 

As filtration is based on ticket Sub category changing here may loose filtration.

Could you please suggest to achieve searching tickets using ticket id.

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    152,847 Most Valuable Professional on at
    Re: Filter tickets in gallery on basis of search box text value

    HI @AJ_vizMan ,

    I am assuming a field name of 'Ticket ID' here

    Sort(
     Filter(
     AllTickets,
     (
     IsBlank(YourSearchBox.Text) ||
     YourSearchBox.Text in 'Ticket ID'
     ) &&
     If(
     isAdmin,
     Subcategory in
     If(
     MyProfile.Mail in COE_CW_Admin,
     MDTeam_SubCategory,
     CoETeam_SubCategory
     ),
     'Created By'.Email = MyProfile.Mail || 
     'Created By'.Claims = MyProfile.UserPrincipalName
     ),		 
     Created,
     Descending
     )
    ) 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • AJ_vizMan Profile Picture
    on at
    Re: Filter tickets in gallery on basis of search box text value

    Hi @WarrenBelz , thank you for quick response.

    I used your response with minor updates however, i am not getting filtered tickets in gallery.

    And there is no error in the formula.

    Clarifications

    1. Ticket ID is a numeric field with name 'ID' as in SP list.

    Formula :-->

    Sort(Filter(AllTickets,
    (IsBlank(TicketSearchbox.Text) || TicketSearchbox.Text in ID) &&
    If(isAdmin, SubCategory in
    If(MyProfile.Mail in COE_CW_Admin, MDM_SubCategory,
    If(MyProfile.Mail in COE_SF_Admin, COE_SF_SubCategory)),
    //If(MyProfile.Mail in COE_SF_Admin, COE_SF_SubCategory) expand code for new team
    'Created By'.Email = MyProfile.Mail || 'Created By'.Claims = MyProfile.UserPrincipalName
    ),
    Created),
    Descending
    )

     

    Do you see any tweak in the formula or anything else to check. Appreciate your response.

     

  • WarrenBelz Profile Picture
    152,847 Most Valuable Professional on at
    Re: Filter tickets in gallery on basis of search box text value

    Hi @AJ_vizMan ,

    As you have mentioned, the syntax is correct providing your data references have the potential to produce the result you are after. I cannot see your data, but with the complexity you are attempting, you need to "break this apart into bits that work and then add things until it stops working - you will then hopefully see what the problem is.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • AJ_vizMan Profile Picture
    on at
    Re: Filter tickets in gallery on basis of search box text value

    Hi @WarrenBelz - have worked on the code and achieved the required functionality 😊

    Thank you for support. 🎩 off

     

    Final code look like below where item can be searched on basis of multiple columns :

    Sort(
    Filter(
    AllTickets,
    (
    IsBlank(TicketSearchbox.Text) ||
    TicketSearchbox.Text in ID || TicketSearchbox.Text in SubCategory || TicketSearchbox.Text in TicketAssignedToIndividual || TicketSearchbox.Text in TaskStatus.Value
    ) &&
    If(
    isAdmin,
    SubCategory in
    If(
    MyProfile.Mail in COE_CW_Admin,
    MDM_SubCategory, 
    COE_SF_SubCategory
    ),
    ('Created By'.Email = MyProfile.Mail ||
    'Created By'.Claims = MyProfile.UserPrincipalName
    )
    )),
    Created,
    Descending
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard