SOLVED

Adding Days

Iron Contributor

I am unable to figure out how to do something that is probably not very difficult.... In a Flow that creates a list item, I would like the Start Date to be the date that the trigger fires, and the Due Date to be one day afterward. I cannot figure out how to create the Due Date calculation. I've tried the Add Days function, but I'm not certain how to do it, and my attempts result in errors.

How can I make this happen?

Thanks in advance.

3 Replies

@JosephNierenberg 

 

utcPlus1.png

 

utcPlus1a.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott  That looks simple enough, but it doesn't seem to work.

 

1. The only dynamic choices available for the "Due Date" field are Modified and Created. This is fine for my purposes. "Created" is defined in the dynamic expressions options as "When this item was created."

 

2. If I add 'Created' first and then try to add days it doesn't work. Adding the addDays function and then clicking the 'Created' expression as the timestamp in the addDays function results in this:

addDays(triggerOutputs()?['body/Created'])

 which makes no sense to me.

 

3. If I just add the expression addDays() then 'Created' is not an available option to insert as the timestamp. If I add it anyway, to produce

addDays (Created,1)

 then the system returns an error that the expression is invalid.

best response confirmed by JosephNierenberg (Iron Contributor)
Solution

@JosephNierenberg you said you wanted the date that the trigger fires. That is today which in Power Automate is the expression utcNow().  So you add that into the expression as I showed in my previous post, you don't/can't select it.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

1 best response

Accepted Solutions
best response confirmed by JosephNierenberg (Iron Contributor)
Solution

@JosephNierenberg you said you wanted the date that the trigger fires. That is today which in Power Automate is the expression utcNow().  So you add that into the expression as I showed in my previous post, you don't/can't select it.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

View solution in original post