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

All functie not working in my filter.

Hello!

I have an application with a ticket system. My gallery looks like this:
https://gyazo.com/149a2c76b0acf3419bc28ce3d939ad61

This is the code of my gallery:

SortByColumns(
    Search(
        If(
            gblIsAdmin;
            MancoTabel;
            Filter(
                MancoTabel;
                Verzender = User().FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Status = selectedStatus
                )
            )
        );
        TekstZoekVeld.Text;
        "Ordernummer";
        "Verzender";
        "Deelorder";
        "Extern";
        "Product";
        "Intern";
        "Deelorder";
        "Tekeningnummer";
        "Omschrijving";
        "Status"
    );
    "Datum";
    If(
        SortDescending1;
        Ascending;
        Descending
    )
)


Currently this is my code of my BrowseGallery of my tickets. I am currently able to filter on 4 different statusses. 

-All
-Open
-Verwerkt in Ridder
-In behandeling

All of these statusses work except for the status "All". Could you guys maybe take a look at my code and explain me why the "All" status is not working? 

If I need to explain my code, just let me know and I will explain it.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Champion
Community Champion

Re: All functie not working in my filter.

Hi @TimoMigchielsen ,

Not the first time I have seen this code . . . .

Have a look at changes to the second If filter - this should show all records for the user if All and your filter if not.

SortByColumns(
   Search(
      If(
         gblIsAdmin;
         MancoTabel;
         Filter(
            MancoTabel;
            If(
               selectedStatus = "All";
               Verzender = User().FullName;
               Verzender = User().FullName && 
               (IsBlank(selectedStatus) || Status = selectedStatus)
            )
         )
      );
      TekstZoekVeld.Text;
      "Ordernummer";
      "Verzender";
      "Deelorder";
      "Extern";
      "Product";
      "Intern";
      "Deelorder";
      "Tekeningnummer";
      "Omschrijving";
      "Status"
   );
   "Datum";
   If(
       SortDescending1;
       Ascending;
       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.

View solution in original post

2 REPLIES 2
Highlighted
Community Champion
Community Champion

Re: All functie not working in my filter.

Hi @TimoMigchielsen ,

Not the first time I have seen this code . . . .

Have a look at changes to the second If filter - this should show all records for the user if All and your filter if not.

SortByColumns(
   Search(
      If(
         gblIsAdmin;
         MancoTabel;
         Filter(
            MancoTabel;
            If(
               selectedStatus = "All";
               Verzender = User().FullName;
               Verzender = User().FullName && 
               (IsBlank(selectedStatus) || Status = selectedStatus)
            )
         )
      );
      TekstZoekVeld.Text;
      "Ordernummer";
      "Verzender";
      "Deelorder";
      "Extern";
      "Product";
      "Intern";
      "Deelorder";
      "Tekeningnummer";
      "Omschrijving";
      "Status"
   );
   "Datum";
   If(
       SortDescending1;
       Ascending;
       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.

View solution in original post

Highlighted
Post Prodigy
Post Prodigy

Re: All functie not working in my filter.

Thank you! Worked perfectly

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,777)