cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

How to display information in a gallery which belongs between two selected dates

Hi,

 

I have a gallery where I want to display information relating to dates that I have chosen from DatePicker fields.

 

Basically a To and From - 

 

The data us held in SP and I have another filter which brings up a location.  So when that location is selected and the To and From datepicker fields have been selected just the information for that location and date range display.

 

Any ideas - I've seen a few questions simular to this but none seem to resolve my query

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver I
Resolver I

Re: How to display information in a gallery which belongs between two selected dates

Hi @v-yutliu-msft 

 

I seemed to have resolved my issue.

 

 My formula looks like this

Filter('Perimeter Issues', Building = Dropdown1.Selected.Result, PickerFrom >= DatePicker1.SelectedDate And PickerTo <=DatePicker2.SelectedDate)
The DatePicker fields have a UpdateContext variable PickerTo & PickerFrom and it doesn't show any delegation issues.

 

Thanks for your assitance

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: How to display information in a gallery which belongs between two selected dates

Hi @ClarkyPA365 

 

From your post below it seems like this video might help.

https://youtu.be/m_j_xN7-LjU

 

Let me know if you don't come right.

 

Dawid van Heerden
Follow on Twitter: @davestechtips
Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
**If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.

Highlighted
Community Support
Community Support

Re: How to display information in a gallery which belongs between two selected dates

Hi @ClarkyPA365 ,

Could you tell the data type of the fields that you want to filter based on?

I assume that field recording dates is date type and field recording location is text type.

Try this formula:

Filter(tablename,
datefield>=fromdatepicker.SelectedDate,
datefield<=todatepicker.SelectedDate,
locationfield=drop down.selected.Value)

 

 

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.
Highlighted
Resolver I
Resolver I

Re: How to display information in a gallery which belongs between two selected dates

Hi @v-yutliu-msft 

Thanks for your reply.

 

I've tried it replacing the relevant fields, types, etc.... but no result seems to appear.

Below is my formula

'Perimeter Issues' is my SP list, DatePicker 1 & " are my Datepickers (ObviouslySmiley Very Happy) Building is the name of the column in my SP list.

 

Filter('Perimeter Issues', Date>=DatePicker1.SelectedDate, Date<=DatePicker2.SelectedDate,Building=Dropdown1.Selected.Result)

 

The 'Date' is underlined in red and error msg states - Invalid argument type. Expecting a Number value

I do have data in my SP list for the dates and building I'm selecting.

 

Any thoughts

Highlighted
Resolver I
Resolver I

Re: How to display information in a gallery which belongs between two selected dates

Hi @v-yutliu-msft 

 

I seemed to have resolved my issue.

 

 My formula looks like this

Filter('Perimeter Issues', Building = Dropdown1.Selected.Result, PickerFrom >= DatePicker1.SelectedDate And PickerTo <=DatePicker2.SelectedDate)
The DatePicker fields have a UpdateContext variable PickerTo & PickerFrom and it doesn't show any delegation issues.

 

Thanks for your assitance

View solution in original post

Highlighted
Resolver I
Resolver I

Re: How to display information in a gallery which belongs between two selected dates

Hi @v-yutliu-msft @DavesTechTips 

 

Think I may have been a bit to quick to say it was a success

 

The formula does work Filter('Perimeter Issues', Building = Dropdown1.Selected.Result, PickerFrom >= DatePicker1.SelectedDate And PickerTo <=DatePicker2.SelectedDate)

 

but not quiet what i need.  All the information from my SP list appears without me changing the dates from the DatePicker fields.  

 

What can i do to resolve this?

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (3,687)