cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
testaccPA
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
v-yutliu-msft
Community Support
Community Support

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
v-yutliu-msft
Community Support
Community Support

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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

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

Top Solution Authors
Top Kudoed Authors
Users online (50,960)