I have a column in my sharepoint list called 'Loading' which is a date field and I would like to add 12 months to this column in order to create a condition.
I am unable to call 'Loading' using the triggerbody function.
My expression is:
Solved! Go to Solution.
I ended up remaking the entire flow and could pull up the columns through dynamic input. My column was 'field_4' instead of 'loading' for some reason. That was the problem.
Hi @charizard ,
Because you're in an "apply to each" loop, that's what you need to reference:
items('Apply_to_each_2')?['Loading']
is greater than or equal to
formatDateTime(addDays(utcNow(),-12), 'Month', 'yyyy-MM-dd')
Hi @BCBuizer
I'm not sure addDays would work for what I'm doing. I need to find the date 12 months before or after 'Loading'.
I've changed it to:
items('Apply_to_each_2')?['Loading']
is greater than or equal to
formatDateTime(addToTime(utcNow(),-12, 'Month', 'yyyy-MM-dd'))
Hi @charizard ,
Indeed addDays may not be the correct function to use. What I have working for this:
Here I found the correct use of addToTime:
https://tomriha.com/how-to-add-months-to-a-date-in-power-automate/
addToTime(utcNow(),12,'Month','yyyy-MM-dd')
I ended up remaking the entire flow and could pull up the columns through dynamic input. My column was 'field_4' instead of 'loading' for some reason. That was the problem.