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 III
Super User III

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.

  

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (30,232)