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

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