cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sam_G42
Level: Powered On

Service Desk Example - Filter for TicketsPage

Please could someone explain how I can add new filters that enable me to filter by who it has been assigned to?

 

I want it to look at the AssignedTo column

 

Capture.JPG

 

Thanks in advance

 

 

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Service Desk Example - Filter for TicketsPage

Hi @Sam_G42,

 

You need to modify the items property of the TicketsGallery, the current code for the items is as below:

 

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)
               )
           )
       )
   )

To have a quick modificaiton, please follow the steps as below:

1. Add A dropdown control (Should be Dropdown1), specify the items property to:

Distinct(Tickets,AssignedTo)

After that, modify the Items property of the TicketsGallery as below:

 

Filter(
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)
               )
           )
       )
   ),
AssignedTo=Dropdown1.Selected.Value)

Then you should be able to filter the gallery with the AssignedTo field.

 

53.PNG

 

Attachments is the sample App I used for testing, see if that would help.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sam_G42
Level: Powered On

Re: Service Desk Example - Filter for TicketsPage

Hi Michael,

 

Thanks for the reply. The filtering by the AssignedTo column works great.

 

The only problem I am now having is that any new calls put into the Service Desk aren't showing as the AssigedTo column is blank by default and they're not showing under New Tickets.

 

Is it possible to either have all results displaying before the filter is used OR to be able to filter by the calls that are blank in the AssignedTo column?

 

Thanks for your help

Highlighted
abonahoom
Level: Powered On

Re: Service Desk Example - Filter for TicketsPage

I know this is a really old request but I'm trying to do something similar, did you ever get this working?

Sam_G42
Level: Powered On

Re: Service Desk Example - Filter for TicketsPage

No sorry, we never did and ended up using another system

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

Follow PowerApps on Twitter

Stay Up-to-Date by following PowerApps on Twitter

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

Users Online
Currently online: 47 members 4,020 guests
Please welcome our newest community members: