My goal is to have the query pull in all records older than 180 days.
I've been using copilot to help me troubleshoot it but after hours of looping and not finding any working solution. I've come here.
So the current attempt at making the query work:
Initialize variable
addDays(utcNow(), -180, yyyy-MM-dd)
Get Items - Apply odata filter
field_3 lt '@{variables('Date180DaysAgo')}'
I'm looping between errors:
current error
It seems that the error occurred due to a DateTime format issue in the filter query of the 'Get items' action. To fix this, ensure that the 'variables_Date___DaysAgo' parameter is correctly formatted as a DateTime string in the 'addDays' function. Check the syntax and format of the DateTime string to match the expected format in the filter query.
past error
It seems that the error occurred due to an issue with the filter query in the 'Get items' action. The expression "Field_3 lt 'addDays(utcNow(), -180, 'yyyy-MM-dd')'" is not valid because the function 'addDays' is being treated as a string instead of being evaluated as a function. To fix this error, you should remove the single quotes around the 'addDays(utcNow(), -180, 'yyyy-MM-dd')' function call in the filter query.
(in between these errors I learned field_3 was case sensitive, so I did fix that.)
It would appear to me if you did that you typed in the expression rather than typed the expression in the popup expression window.
You would do exactly that and wrap it in single quotes, but then its not treated as a string
The proper way was to use the Dynamic Window, use the Expression Tab, type the expression stuff you want, then go to the Dynamic Tab to fill in the rest and click ok.
Then have the Single quotes around that and it will work, no idea what you got going on :-)
Was this reply helpful?YesNo
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.