cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
testaccPA
Level: Powered On

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
Community Support Team
Community Support Team

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
Community Support Team
Community Support Team

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 308 members 5,503 guests
Please welcome our newest community members: