In reference to this Blog:

71
2
07-22-2020 12:48 PM
ReneeOpatz
New Contributor II

n reference to this Blog: https://community.esri.com/groups/survey123/blog/2019/01/22/managing-time-and-date-from-survey123-in-microsoft-flow I can't get my date field in the right part of this code- please help!!!

0 Kudos
2 Replies
Philip-Wilson
Esri Frequent Contributor

Hi Renee,

Were you able to resolve this issue in Microsoft Flow? What is the exact issue, please provide additional details. Is it that the calculation is not working, or that you can not put the dynamic fields inline in the code in the right place?

Regards,

Phil.

0 Kudos
ReneeOpatz
New Contributor II

Yes the issue I was having was understanding how you insert feature attributes into an expression in Power Automate. I figured it out-

Go to Expressions and select the formula AddSeconds.

Click over to dynamic content and paste the following  '1970-1-1', Div(triggerBody()?,1000) , 'HH:mm:ss' into the parentheses in addseconds()

So it looks like this in the dynamic content box:
addseconds( '1970-1-1',Div(triggerBody()? ,1000) , 'HH:mm:ss')

insert your survey123 date field after the question mark. 

it will look like this in the code after you insert it:

addseconds('1970-1-1'Div(triggerBody()?['feature']?['attributes']?['dateTime'],1000) , 'HH:mm:ss')

This might seem really detailed about the steps but you can't assume people know where to inset both formulas and fields from surveys.

I am excited for power automate- we are already duping survey results into SmartSheet for work planning!

Thank you- Renee