Hello friends. Hope someone can help. I am trying to filter the contents of a library to records who's RemindDate field is equal to the UTC. Here's my syntax in the Filter Query property of the Get Files
RemindDate eq formatDateTime(utcNow(),'MM-dd-yyyy'). The RemindDate field is a calculated column and is stored as DATE ONLY format.
I'm getting this message with a status of 400
Solved! Go to Solution.
Hi @tonylitvak ,
If we couldn't filter the items in the Get items action, then maybe the only way is to change the column type from lookup.
Best regards,
Alice
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.
Hi @tonylitvak
to get the correct date you should type formatedatetime function in expression instead in filter query box , something like this:
---------------------------------------------------------------------------------------
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others
Hey @DeepakS thank you for the quick response. I tried your suggestion and have a slightly different error message. I also tried the formatDateTime(utcNow(),'MM-dd-yyyy') thinking it will match the date format of the column called RemindDate2 but this didnt work as well.
Hi @tonylitvak ,
The error message told that the field 'RemindDate 2' of type 'Calculated' cannot be used in the query filter expression, so you couldn't use the filter query for the Calculated column, please take a try to add a Filter Array action under the Get files action as my screenshot below:
Best regards,
Alice
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.
@v-alzhan-msft thank you. So the flow is working, but it does not appear to be respecting the filter. I have 3 documents in a library for testing purposes, none of which have a remind date set to utc. However, when the flow runs, i get 3 email messages, prompting me to think that the filter may not be constructed correctly? My goal is to only process email messages where the remind date is set to utc date.
Heres my screenshot and again, big thank you for helping.
Proud to be a Flownaut!
Hi @tonylitvak ,
You should choose the Body dynamic content from the Filter Array action, and you couldn't use the dynamic content from the Get files action inside the Send an email action, you could only add expression as my screenshot below:
items('Apply_to_each')?['RemindDate2']
Best regards,
Alice
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.
Thank you @Jcook . My understanding is that theres a limit on max number of items or documents that flow will retrieve currently set to 5000. my library has well over 50,000 documents. While im sure the if condition logic will work, the flow will fail since it wont be able to process each document because of the threshold limit.
Hi @tonylitvak ,
If we couldn't filter the items in the Get items action, then maybe the only way is to change the column type from lookup.
Best regards,
Alice
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.
User | Count |
---|---|
88 | |
37 | |
26 | |
13 | |
13 |
User | Count |
---|---|
127 | |
54 | |
38 | |
24 | |
21 |