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
Super User
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
Super User
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

@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
Super User
Super User

Hi @mtagliaferri,

 

No worries, happy to help out! 😀

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,421)