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 / Service Desk Example -...
Power Apps
Answered

Service Desk Example - Filter for TicketsPage

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Can someone explain how the TicketsPage shows only the selected records from the HomePage option that was chosen?  On the HomePage I see the OnSelect Action with all the IF statements but I don't understand how the filtering is working.

Categories:
I have the same question (0)
  • Verified answer
    Ryanmch Profile Picture
    Microsoft Employee on at

    On the HomePage, the OnSelect statement you mentioned has a Navigate call for each condition which passes the context to the TicketsPage.

     

    The first Navigate call is: Navigate(TicketsPage,ScreenTransition.Fade,{type:"All"}). The context being passed has a property named "type" with the value of "All" and, in the time based cases, an additional property called "datetype" is set respectively based on the condition.

     

    On the TicketsPage, the TicketsGallery items is set to:

     

     If(type="All",Tickets,If(type="Tickets older than 3 days", Filter(Tickets,   DateCreated <> datetype && DateCreated <> Text(Today()), DateCreated <> Text(DateAdd(Today(), -2)),DateCreated <> Text(DateAdd(Today(), -1))|| DateClosed <> datetype && DateClosed <> Text(Today()), DateClosed <> Text(DateAdd(Today(),-2)),DateClosed <> Text(DateAdd(Today(), -1))),If(type="Tickets opened today",Filter(Tickets,datetype in DateCreated),If(type="Tickets closed today",Filter(Tickets,datetype in DateClosed),Filter(Tickets,type in Status)))))

     

    The first condition, checks if type is "All" then use the Tickets datasource while the following conditions use the Filter formula to limit the datasource items given a condition.

     

    See the article on filtering for more information. https://powerapps.microsoft.com/en-us/tutorials/function-filter-lookup/.

     

    Ryan McHenry [MSFT - PowerApps]

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much for the explanation!

  • Sajarac Profile Picture
    3,284 on at

    Good Morning, this post is solved but I have a quick question?

     

    If I want to add a new filter, lets say tickets by person how can I achive this?

     

    Thanks in advance for your response

     

    Capture.JPG

  • abonahoom Profile Picture
    83 on at

    Hi

    Were you able to get this firgured out?  I'm trying to do the same thing?

  • Sajarac Profile Picture
    3,284 on at

    Well I give up trying to change this, what I did instead was to replace the current filters by my own in both the excel file and the filter formula. i.e I've changed "On Hold" -> "Jhon Smith" , "Tickets in Progress" by "Jhon Lenon" etc. BTW case sensitive.

     

    Hope this help!

     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 528

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard