cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Dashboard click on icon, filter by status

Hello!

Right now I have a dashboard (https://gyazo.com/d02d19ffee9328b82a8a48cb7f295d3f)

And now whenever I click on lets say "Open tickets" I want to have it navigate me to my ticketpage and filter on just the open tickets. These 4 statussus are inside of my "MancoTabel" under the column "Status" In this column I have the following 3 options:

Open
In behandeling
Verwerkt in Ridder 

https://gyazo.com/3585ff93be57247446d82072382f0125 This is my ticketpage where the information is stored. Right now I only have open tickets. 

Question:

How can I select a group and have it navigate me to another screen and filter it by that status + add a "All" filter because this one is not inside of my MancoTabel -> Status

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Dashboard click on icon, filter by status

Hi @TimoMigchielsen ,

Here's your formula, formatted:

(
    SortByColumns(
        Search(
            Filter(MancoTabel, 
                IsBlank(Gallery1.Selected.Result) ||
                Status = Gallery1.Selected.Result
            ), 
            TextSearchBox1.Text, 
            "Ordernummer",
            "Verzender",
            "Deelorder", 
            "Extern", 
            "Product", 
            "Intern", 
            "Deelorder", 
            "Tekeningnummer", 
            "Omschrijving",
            "Status"
        ), 
        "Datum", 
        If(SortDescending1, Ascending, Descending)
    )
)

(You don't need the first pair of parentheses) 

 

You can combine the filters like this:

SortByColumns(
    Search(
        Switch(selectedStatus,
            "All",MancoTabel,
            Filter(MancoTabel, 
                IsBlank(Gallery1.Selected.Result) ||
                Status = Gallery1.Selected.Result
            )
        ), 
        TextSearchBox1.Text, 
        "Ordernummer",
        "Verzender",
        "Deelorder", 
        "Extern", 
        "Product", 
        "Intern", 
        "Deelorder", 
        "Tekeningnummer", 
        "Omschrijving",
        "Status"
    ), 
    "Datum", 
    If(SortDescending1, Ascending, Descending)
)

Notice that I kept the way you set up your filter to Gallery1.Selected.Result instead of filtering against selectedStatus. I also kept that part the same so you could see how it fits.

I prefer the variable as it is static whereas the selection in Gallery1 could shift if the gallery is refreshed.

 

Change Gallery1.Selected.Result to selectedStatus if you prefer.

View solution in original post

7 REPLIES 7
Highlighted
Power Apps
Power Apps

Re: Dashboard click on icon, filter by status

Hi @TimoMigchielsen,

This is multiple questions, so I'll break them apart:

 

1. How can I select a group and have it navigate me to another screen

 

Set the OnSelect property of the labels that show tickets:

 

Set(selectedStatus,"Open");
Navigate(ticketpage)

 

This means, "Set a variable called selectedStatus to the word "Open" and then go to the ticketpage."

You will need to change "Open" in the formulas you use for "In behandeling" and "Verwerkt in Ridder."

 

2. Filter it by that status + add a "All" filter because this one is not inside of my MancoTabel -> Status

 

Set the Items property of the gallery to:

Switch(selectedStatus,
    "All",MancoTabel,
    Filter(MancoTabel,Status=selectedStatus)
)

This means, "Change the table that is shown in the gallery depending on what the selectedStatus is. If the selectedStatus is "All", show the full MancoTabel table. Otherwise, Filter MancoTable to show only those tickets whose status is equal to the selectedStatus."

 

Let me know how it turns out.

Highlighted
Post Prodigy
Post Prodigy

Re: Dashboard click on icon, filter by status

Thank you so much for your answer!

How do I combine these filters? Could you type it for me, please? I am bad at nesting these things.


Code of my gallery right now:

(SortByColumns(Search(Filter(MancoTabel, IsBlank(Gallery1.Selected.Result) ||
Status = Gallery1.Selected.Result), TextSearchBox1.Text, "Ordernummer","Verzender","Deelorder", "Extern", "Product", "Intern", "Deelorder", "Tekeningnummer", "Omschrijving","Status"), "Datum", If(SortDescending1, Ascending, Descending)))

Code that needs to be nested in that you sent me:

Switch(selectedStatus,
    "All",MancoTabel,
    Filter(MancoTabel,Status=selectedStatus)
)

  @Mr-Dang-MSFT 

Highlighted
Power Apps
Power Apps

Re: Dashboard click on icon, filter by status

Hi @TimoMigchielsen ,

Here's your formula, formatted:

(
    SortByColumns(
        Search(
            Filter(MancoTabel, 
                IsBlank(Gallery1.Selected.Result) ||
                Status = Gallery1.Selected.Result
            ), 
            TextSearchBox1.Text, 
            "Ordernummer",
            "Verzender",
            "Deelorder", 
            "Extern", 
            "Product", 
            "Intern", 
            "Deelorder", 
            "Tekeningnummer", 
            "Omschrijving",
            "Status"
        ), 
        "Datum", 
        If(SortDescending1, Ascending, Descending)
    )
)

(You don't need the first pair of parentheses) 

 

You can combine the filters like this:

SortByColumns(
    Search(
        Switch(selectedStatus,
            "All",MancoTabel,
            Filter(MancoTabel, 
                IsBlank(Gallery1.Selected.Result) ||
                Status = Gallery1.Selected.Result
            )
        ), 
        TextSearchBox1.Text, 
        "Ordernummer",
        "Verzender",
        "Deelorder", 
        "Extern", 
        "Product", 
        "Intern", 
        "Deelorder", 
        "Tekeningnummer", 
        "Omschrijving",
        "Status"
    ), 
    "Datum", 
    If(SortDescending1, Ascending, Descending)
)

Notice that I kept the way you set up your filter to Gallery1.Selected.Result instead of filtering against selectedStatus. I also kept that part the same so you could see how it fits.

I prefer the variable as it is static whereas the selection in Gallery1 could shift if the gallery is refreshed.

 

Change Gallery1.Selected.Result to selectedStatus if you prefer.

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: Dashboard click on icon, filter by status

Hello!

I've tried it your way:

Code for the ticketpage (changed gallery1.selected.result to selectedStatus): 

SortByColumns(
Search(
Switch(selectedStatus,
"All",MancoTabel,
Filter(MancoTabel,
IsBlank(selectedStatus) ||
Status = selectedStatus
)
),
TextSearchBox1.Text,
"Ordernummer",
"Verzender",
"Deelorder",
"Extern",
"Product",
"Intern",
"Deelorder",
"Tekeningnummer",
"Omschrijving",
"Status"
),
"Datum",
If(SortDescending1, Ascending, Descending)
)

I then put this code inside of the onSelect for filtering. 

Set(selectedStatus,"All");
Navigate(Overzicht)

Now whenever I just click on the one that has "Open" instead of "All" but nothing happends besides navigating to it. It just shows nothing at all. My other filter is now not working anymore too.

@Mr-Dang-MSFT 

Highlighted
Post Prodigy
Post Prodigy

Re: Dashboard click on icon, filter by status

Edit:

It does work good. But now my other filter is not working anymore, any idea what could be causing this to happen?

Highlighted
Power Apps
Power Apps

Re: Dashboard click on icon, filter by status

Can you explain what you mean by this:


@TimoMigchielsen wrote:

my other filter is not working anymore


In this setup you will only need one gallery with one filter for all of the tickets.

 

As long as the value of selectedStatus is spelled exactly the same as the way that the column expects, this should work out. Can you clarify your setup a little bit more?

Highlighted
Post Prodigy
Post Prodigy

Re: Dashboard click on icon, filter by status

It's all fine, I figured it out myself 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,292)