cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mtagliaferri
Resolver I
Resolver I

Concatenate and convert from Form

I have a variable set to string to concatenate some columns from a form which has dropdowns for the month (January, February, etc) and the year (2021,2022, etc) and returns the format 01-January-2021 and I used succesfully the below expression

concat('01-',outputs('Get_response_details')?['body/rb169a96e210f40bf97d0da657b442f85'],'-',outputs('Get_response_details')?['body/r76b67d1fd2fb42f682b899f209e81a4b'])

 

Now I need to convert this into a date for the purpose of update an item in a sharepoint list, I tried to incluse in the same expression the formatDateTime

formatDateTime(oncat('01-',outputs('Get_response_details')?['body/rb169a96e210f40bf97d0da657b442f85'],'-',outputs('Get_response_details')?['body/r76b67d1fd2fb42f682b899f209e81a4b']),'yyyy-MM-dd')

 

I am able to save the flow with no errors but when I run this I get the below error:

Unable to process template language expressions in action 'Initialize_variable_2' inputs at line '1' and column '9153': 'The template function 'oncat' is not defined or not valid.'.

How can I format correctly the date?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Dual Super User
Dual Super User

Hi @mtagliaferri,

 

I think you made a small typo. In the second expression it says oncat instead of concat.

View solution in original post

3 REPLIES 3
Expiscornovus
Dual Super User
Dual Super User

Hi @mtagliaferri,

 

I think you made a small typo. In the second expression it says oncat instead of concat.

@Expiscornovus `😅 I been staring at that string for so long and I could not spot that!!

Thanks for the extra set of eyes there!

Expiscornovus
Dual Super User
Dual Super User

Hi @mtagliaferri,

 

No worries, happy to help out! 😀

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,549)