cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
andygp25
Helper III
Helper III

How to filter base on text box, dropdown and date picker?

I have a gallery filtered by current user, text box (search), dropdown list with values from a sharepoint column, and date picker. 

 

I am not sure how to plug all filters so that by default shows all data for current user and either search or dropdown or date picker date. 

 

Can you please help?

 

Sort(Filter('Travel Requests List','Primary Contact' = varPrimaryContact.Email Or 'Secondary Contact' = varSecondaryContact.Email , StartsWith('Employee Name', TextInput1.Text )  Or 'Ship Code' = Dropdown1.Selected.Result ) ,'Date of Travel',Ascending)
1 ACCEPTED SOLUTION

Accepted Solutions

Hi @andygp25 ,

Sorry - missed the date picker - a bit more manipulation required here

Sort(
   Filter(
      'Travel Requests List',
      ( 
         'Primary Contact' = varPrimaryContact.Email ||
         'Secondary Contact' = varSecondaryContact.Email
      ), 
      StartsWith('Employee Name', TextInput1.Text),
      'Ship Code' = Dropdown1.Selected.Result,
      DateDiff(
         YourDatePickerName.SelectedDate,
         'Date of Travel',
         Days
      )=0
   ),
   'Date of Travel',
   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.

  

View solution in original post

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @andygp25 ,

Depends a bit on what and/or combinations you want, but the below should take a list matching either of the two emails and then filter by a combination of the other two controls.

Sort(
   Filter(
      'Travel Requests List',
      ( 
         'Primary Contact' = varPrimaryContact.Email ||
         'Secondary Contact' = varSecondaryContact.Email
      ), 
      StartsWith('Employee Name', TextInput1.Text),
      'Ship Code' = Dropdown1.Selected.Result 
   ),
   'Date of Travel',
   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.

 

How do I add a datepicker value in the StartsWith?

Hi @andygp25 ,

Sorry - missed the date picker - a bit more manipulation required here

Sort(
   Filter(
      'Travel Requests List',
      ( 
         'Primary Contact' = varPrimaryContact.Email ||
         'Secondary Contact' = varSecondaryContact.Email
      ), 
      StartsWith('Employee Name', TextInput1.Text),
      'Ship Code' = Dropdown1.Selected.Result,
      DateDiff(
         YourDatePickerName.SelectedDate,
         'Date of Travel',
         Days
      )=0
   ),
   'Date of Travel',
   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.

  

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,117)