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

Filtering Dates

All,

I have a column call 'NextDate' that I want to use in flow to send me reminder of when to call people, the flow is below:

 Reminder.png

This works well but i cannot seem to filter the 'NextDate' column to only send me the current date as in 11/02/2019, I have used the filter array as below:

rem filter.pngLHS Expression

 

utcNow('yyyy-MM-dd')

RHS Expression

item()?['NextDate']

Where I am going wrong.

 

Regards,

 

Andrew

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WDRC
Level: Powered On

Re: Filtering Dates

@v-yuazh-msft @MarkStokes

 

The completed flow for anyones referance in the future.

 

Reminder 1.png
Regards,

 

Andrew

 

View solution in original post

6 REPLIES 6
Super User
Super User

Re: Filtering Dates

Ok. Two things.

Firstly. How many items do you have in your SharePoint list? By default the Get Items will Max out at 100, so you might not actually be getting all the items you expect. Hence they don’t show up in your filter.

Secondly. “Filter as early as possible”. The quicker you reduce your result set the better. You can reduce your result set in the SharePoint Get Items action by adding the following expression to the filter part of the action:
NextDate eq formatDateTime(utcNow(), ‘yy-MM-dd’)

Be sure to swap out my stupid iPhone quotes (‘) for proper ones that Flow likes!

Then, you shouldn’t need your filter Action at all.

Also.... for some weird reason. I don’t know why, or if it makes a difference, but I would always do your LHS and RHS the other way round. No idea if that would fix your Action or just satisfy my OCD.

HTH,

- Mark.
WDRC
Level: Powered On

Re: Filtering Dates

@MarkStokes

Thanks for the above, however I have an issue in that 'NextDate' is calculated column, therefore I cannot do any filtering.  So I have had to reconstruct my flow to basically:

  • Get Items - Original
  • Update Items (place 'nextdate' into a new column called 'reminder')
  • Get Items - New 
  • Filter on get item

The above seems to work but I not got time to fully test and finish it.  If you can hold off for while (48Hrs) that would be great.

Regards,

 

Andrew

 

Super User
Super User

Re: Filtering Dates

Sure thing.

Just reply here when you’ve tested it out.

- Mark
Community Support Team
Community Support Team

Re: Filtering Dates

Hi @WDRC,

 

Have your problem be solved?

 

Your flow should configured as below:

Capture.PNG

Please let me know if your problem could be solved.

 

 

Best regards,

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

WDRC
Level: Powered On

Re: Filtering Dates

@v-yuazh-msft @MarkStokes

 

This is now resolved and I have had an email this morning with four bits of information from my SP list.



Reminder Email.pngA few things to do like borders and the the dates being in the UK format but I am okay with that.

@v-yuazh-msf I am sure it somewhere in the learning pages on the MSFT sites but why do I have to go through a complete replacement of a SP list to make sure column names do not have spaces so I can actually filter them.  The advices is very technical but it could be better, if FLOW is to stand on its own two feet as JonL said last week at a meeting in London and we are to pay more (maybe) then I am sure there is a lot of learning's that could be taken away from this forum for articles.  Sorry for the rant but I have learnt something this week.

Anyway thanks for your help both of you I am marking this as solved 

Regards,

 

Andrew

 

 

 

 

 

WDRC
Level: Powered On

Re: Filtering Dates

@v-yuazh-msft @MarkStokes

 

The completed flow for anyones referance in the future.

 

Reminder 1.png
Regards,

 

Andrew

 

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

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