Hi All,
I am trying to build a reminder email with a HTML table with the records that are overdue for processing. I have filtered my get Items by the relevant choice from my SharePoint List (Status eq 'Logged') and then I want to use a Filter Array to check if Due Date has passed, but Im getting all sorts of errors, any help would be great!
error details
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@lessOrEquals(formatDateTime(item('Due Date'), 'ddMMyyyy'), utcNow())' failed: 'The template language function 'item' must not have any parameters.'.
Filter Array
GetItems
Create HTML Table
Select Function
Solved! Go to Solution.
lessOrEquals(formatDateTime(item()['Due Date'], 'ddMMyyyy'), utcNow())
This will fix your expression error, but I'd be surprised if the date comparison works with that date format you have. Would 'yyyy-MM-dd' not work better for a date stored in a SharePoint list?
Even better would be to use an oData query on the SharePoint Get Items action and then you would have no need of the filter as you'd only get records back that were overdue.
lessOrEquals(formatDateTime(item()['Due Date'], 'ddMMyyyy'), utcNow())
This will fix your expression error, but I'd be surprised if the date comparison works with that date format you have. Would 'yyyy-MM-dd' not work better for a date stored in a SharePoint list?
Even better would be to use an oData query on the SharePoint Get Items action and then you would have no need of the filter as you'd only get records back that were overdue.
Thanks @Paulie78 apreciate you coming back so quick!
i'm getting an error:
Flow save failed with code 'WorkflowRunActionInputsInvalidProperty' and message 'The 'inputs' of workflow run action 'Filter_array' of type 'Query' is not valid. Property 'where' must be a template language expression.'
You didn’t put the expression in the expression editor. You just put it in as plain text.
Thanks @Paulie78 , I am pretty new to Odata and find it a little confusing.
How would I add it to the Query?
Status eq 'Logged' and 'Due Date' and ????
Thanks again appreciate your help!
Go with the filter query for now. I’m not near a computer so can’t reply. But will do tomorrow unless someone else steps in.
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
127 | |
54 | |
38 | |
26 | |
21 |