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.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,959)