Hi Automaters,
New to using Microsoft Automate. Hoping this is a quick fix for someone.
I have set up a flow so when someone submits a survey123 that info gets written into a spreadsheet in Sharepoint. It's working great! Except for the date/time format in two fields...
The two fields are date fields in S123/AGOL, so I'm inputting them as dynamic content, and I want them to be in UTC + 12.
I was advised this could work- putting in an expression.
formatDateTime(addHours(utcNow(triggerOutputs()?['body/feature/attributes/Contact_date']),12),'dd/MM/yyyy HH:mm')
The flow is failing though, and this is the error I'm getting.
Unable to process template language expressions in action 'Add_a_row_into_a_table_-_Consult_on_effects_Contractor' inputs at line '0' and column '0': 'The template language function 'utcNow' expects its parameter to be of type string. The provided value is of type 'Integer'. Please see https://aka.ms/logicexpressions#utcnow for usage details.'.
I posted in the Microsoft Automate Community forums on their website, but haven't gotten to the root of the problem yet. I thought maybe someone in this community has experienced it before since you're also AGOL users.
Thanks in advance for your help.
Solved! Go to Solution.
Survey123 appears to be passing UNIX timestamps to your DynamicContent. Try instantiating a variable that converts your UNIX integer to a string and then format that in your Timezone offset expression.
Survey123 appears to be passing UNIX timestamps to your DynamicContent. Try instantiating a variable that converts your UNIX integer to a string and then format that in your Timezone offset expression.
Thank you so much @CoffeeforClosers . That was doing my head in! Fixed now!