I have a flow that will be comparing a date in a SharePoint list and more than 2 years old a status will be set in the item.
I have tried various solutions for evaluating the date, but I am getting this error:
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')?['ID']' is of type 'Integer'. The result must be a valid array.
The first formula in the conditon:
formatDateTime(outputs('LastComplete'),'yyyy-mm-dd')
The second formula in the condition:
formatDateTime(addDays(utcNow(),-730),'yyyy-mm-dd')