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

Filter and Datepicker

hello, I have a filter from the date (from, to); a filter on customer name and 1 filter on tour.

Now I would like to combine all 3 filters

anyone have an idea?

If(TextSearchBox_Essensplan_edit_Kunde.Text <> ""; //1. if wenn kunde nicht leer
Filter(Essenplan; StartsWith(Kunde.Value; TextSearchBox_Essensplan_edit_Kunde.Text) ); //1. If DANN -> filtere nach Kunde
If(TextSearchBox_Essensplan_edit_Tour.Text <> ""; //1. if SONST -> else if prüfung wenn tour nicht leer
Filter(Essenplan; StartsWith('Kunde:Tour'.Value; TextSearchBox_Essensplan_edit_Tour.Text) ); //2. else if DANN -> filter auf tour wenn tour net leer
Filter( //sonst (2. else if) filtere allgemein auf datum....
Essenplan; Datum >= DatePicker_Essensplan_Startdatum.SelectedDate; Datum <= DatePicker_Essensplan_Enddatum.SelectedDate)) //1. if SONST
) //end basic 1. if

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Filter and Datepicker

Hi @testaccPA ,

Do you want to filter based on 2 textinputs and 2 datepickers?

Could you tell me what are the 2 datepickers' DefaultDate?

I assue that their DefaultDate are both empty, so you also need to justify this.

If so, please try this formula:

Filter(Essenplan;
If(IsBlank(TextSearchBox_Essensplan_edit_Kunde.Text);true;StartsWith(Kunde;TextSearchBox_Essensplan_edit_Kunde.Text));
If(IsBlank(TextSearchBox_Essensplan_edit_Tour.Text);true;StartsWith('Kunde:Tour'; TextSearchBox_Essensplan_edit_Tour.Text));
If(IsBlank(DatePicker_Essensplan_Startdatum.SelectedDate);true;Datum >= DatePicker_Essensplan_Startdatum.SelectedDate);
If(IsBlank(DatePicker_Essensplan_Enddatum.SelectedDate);true;Datum <= DatePicker_Essensplan_Enddatum.SelectedDate)
)
//if the textinput or datepicker is empty, then the confition is true

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Filter and Datepicker

Hi @testaccPA ,

Do you want to filter based on 2 textinputs and 2 datepickers?

Could you tell me what are the 2 datepickers' DefaultDate?

I assue that their DefaultDate are both empty, so you also need to justify this.

If so, please try this formula:

Filter(Essenplan;
If(IsBlank(TextSearchBox_Essensplan_edit_Kunde.Text);true;StartsWith(Kunde;TextSearchBox_Essensplan_edit_Kunde.Text));
If(IsBlank(TextSearchBox_Essensplan_edit_Tour.Text);true;StartsWith('Kunde:Tour'; TextSearchBox_Essensplan_edit_Tour.Text));
If(IsBlank(DatePicker_Essensplan_Startdatum.SelectedDate);true;Datum >= DatePicker_Essensplan_Startdatum.SelectedDate);
If(IsBlank(DatePicker_Essensplan_Enddatum.SelectedDate);true;Datum <= DatePicker_Essensplan_Enddatum.SelectedDate)
)
//if the textinput or datepicker is empty, then the confition is true

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020 Winner Announced

Check it out!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (12,158)