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

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
WarrenBelz Community Champion
Community Champion

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

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 Community Champion
Community Champion

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

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.

 

andygp25 Helper II
Helper II

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

How do I add a datepicker value in the StartsWith?

WarrenBelz Community Champion
Community Champion

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

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (9,638)