I am trying to use the addDays expression to check if the current date plus a number of days saved in a SPO list item equals the Due Date saved in the same list. I do a Get Items > Current Time (for today's date) > Filter Array to only use items with a status of "In Process" > then an Apply to Each containing a condition with the following:
@equals(addDays(body('Current_time'), int(body('Get items')?['First warning'])), items('Apply_to_each')?['Due_x0020_date'])
My second parameter always returns null. I have tried changing "body('Get items')?['First warning'])" to "items('Apply_to_each')?['First warning']" but still get an error.
Please help!
Solved! Go to Solution.
Hi @abwaters,
What is the type of the "First warning" column in your sharepoint list?Is it s Number type?
I have made a test on my side to create the "First warning" column in sharepoint list with a Number type, and I have create the flow as below:
The expression in the Filter array as below:
@equals(item()?['status']?['Value'], 'In Process')
The expression in the Condition as below:
@equals(formatDateTime(addDays(utcNow(), int(item()?['First_x0020_warning'])), 'yyyy-MM-dd'), formatDateTime(item()?['Due_x0020_Date'], 'yyyy-MM-dd'))
The flow would run successfully as below:
Best regards,
Alice
Hi @abwaters,
What is the type of the "First warning" column in your sharepoint list?Is it s Number type?
I have made a test on my side to create the "First warning" column in sharepoint list with a Number type, and I have create the flow as below:
The expression in the Filter array as below:
@equals(item()?['status']?['Value'], 'In Process')
The expression in the Condition as below:
@equals(formatDateTime(addDays(utcNow(), int(item()?['First_x0020_warning'])), 'yyyy-MM-dd'), formatDateTime(item()?['Due_x0020_Date'], 'yyyy-MM-dd'))
The flow would run successfully as below:
Best regards,
Alice
Hey, @abwaters!
Thank you for posting on the Flow Community Forum! It appears as though @v-yuazh-msft would like some more information in order to further assist you properly with your issue. Please share any additional information that was requested in order to decrease the amount of time that it will take for you to be assisted!
Thank you for being an active member of the Flow Community!
-Gabriel
Flow Community Manager
Yes the First Warning field is a number type - number of days before the Due Date. What you put up is very helpful. I really appreciate it. I think the expressions are pretty powerful if you understand the syntax. I actually have my flow working great. Just have to get the data in my SPO list.
Thanks again!
User | Count |
---|---|
61 | |
52 | |
49 | |
28 | |
17 |
User | Count |
---|---|
26 | |
23 | |
23 | |
23 | |
22 |