I'm trying to build a flow that will trigger based on a date from a list in SharePoint. We're trying to automate expiration reminders. I have a several dummy dates to trigger for testing, but every time the date comparison comes back false. I've used this template for other flows that work. The formatdatetime piece I have tried "MM-dd-yyyy", "yyyy-MM-dd", etc. The requested column is calculated, but I've had other flows based on calculated fields.
Solved! Go to Solution.
Hi @Jswanson1 ,
From your screenshot, the value of the calculated column output contains the time, so you also need to use the formatDateTime() function to convert its format, like:
Best Regards,
Please see my example below. The expression used in the condition can be seen in the comments area.
I added to the condition in order to filter out folders.
Also, a better way to approach this might be to use a filer query which will simplify your Flow and eliminate the condition. The issue is that you can't use calculated columns in a filter query - you would need to do the calculation in an expression inside of the filter query as well as filter out the folders.
I'm not sure how to do it differently than having calculated fields in the list itself. I was trying to use conditions rather than having all the calculated columns, but it wasn't triggering that way. For example, an item expires on 6/14/2019. I have that column, then I have calculated columns based on that date for 14 days prior to expirations, then 30 days prior to expiration for reminder email alerts.
I know only enough about flows to be dangerous and frustrated.
Try using expressions in your condition per my example - I believe it will address your issue.
Yes but I don't understand what to do with what you've provided. I don't understand why you're using get files, rather than items, and I don't understand why you've included a folder condition.
My error - somehow I got the impression that this was a library. Just replace my Get files action with a Get items action. If you don't have folders in your list then ignore the folder condition.
The date column you are using is a calculated column. Can you tell me the calculation? I'll provide a better way of approaching this issue using a filter query.
The expressions that I used allow for the dates to be formatted in the same why allowing you to do the comparison in your condition.
Reference the output of the compose action in you condition rather than the co7
Hi @Jswanson1 ,
From your screenshot, the value of the calculated column output contains the time, so you also need to use the formatDateTime() function to convert its format, like:
Best Regards,
I have been using formatedatetime for yyyy-MM-dd and it still comes back as false, even if they actually match.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
41 | |
40 | |
37 | |
34 | |
30 |
User | Count |
---|---|
48 | |
37 | |
35 | |
26 | |
24 |