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

Announcements

News and Announcements icon
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
    155,378 Most Valuable Professional on at

    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

    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
    155,378 Most Valuable Professional on at

    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

    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard