cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nithishguptak
Helper I
Helper I

Multiple filters for gallery

Hello all,

 

I'm trying to filter a gallery based on text from one screen and based on dropdown from another screen.  How do I combine these two filters ? so if a user clicks on first page erfasst it should filter gallery items erfasst and if the user clicks edit page and uses dropdown then it should filter Gallery items

 

I have two separate filters mentioned below 

 


//Filter('Journal Sicherheitsrelevante Ereignisse';Status = StatusValue); SortByColumns(Search([@'Journal Sicherheitsrelevante Ereignisse']; TextInput3.Text; //"Abstellma_x00df_nahme"; "ID_Jahr_x002f_LFdnR";"Melder"); "ID_Jahr_x002f_LFdnR";If(SortDescending1; Descending; Ascending))


(If(Dropdown1.Selected.Result="Alle";'Journal Sicherheitsrelevante Ereignisse'; Filter('Journal Sicherheitsrelevante Ereignisse';Status= Dropdown1.Selected.Result)))powerapps1.PNGpowerapps2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @nithishguptak ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Visit my blog Practical Power Apps

View solution in original post

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @nithishguptak ,

Something like this should do it - note that Search is not Delegable anyway, but as long as the top filter returns under your Delegation limit, this should work (you will however get no warning).

With(
   {
      wList:
      Filter(
         'Journal Sicherheitsrelevante Ereignisse';
         Status = StatusValue &&
         (
            Dropdown1.Selected.Result="Alle" ||
            Status= Dropdown1.Selected.Result
         )
      )
   },
   SortByColumns(
      Search(
         wList;
         TextInput3.Text;
         "Abstellma_x00df_nahme"; 
         "ID_Jahr_x002f_LFdnR";
         "Melder"
      };
      "ID_Jahr_x002f_LFdnR";
      If(
         SortDescending1; 
         Descending; 
         Ascending
      )
   )
)

 

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.

Visit my blog Practical Power Apps

@WarrenBelz thanks for your reply, but  I see dropdown doesn't filter anything with your filter. It works perfectly fine from the main screen but not from the dropdown 

@nithishguptak ,

If you are referring to

(
   Dropdown1.Selected.Result="Alle" ||
   Status= Dropdown1.Selected.Result
)

your issue I see now is the line above

Status = StatusValue

It cannot equal both, so which one do you want to filter on ?

WarrenBelz
Super User
Super User

Hi @nithishguptak ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Visit my blog Practical Power Apps

nithishguptak
Helper I
Helper I

it works perfectly fine, however how can I filter/show all the tickets if All is clicked on Dropdown ? 

 

Thank you for your time. 

Hi @nithishguptak  ,
As I noted, you cannot have

Status = StatusValue

and also

 

 Status= Dropdown1.Selected.Result

which one do you want it to equal (or do you want either ?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,577)