cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sjehanzeb
Frequent Visitor

Formatting a string response from Microsoft Forms

I have a Microsoft Form response giving me a string value. I need to format it ensure that the data is in a particular format. 

 

example:   the required string is 01234, if a response is submitted as '1234' or ' 1234 ', value should be converted to '01234'

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @sjehanzeb,

 

It seems that you would like to add “0” before the string and remove the leading whitespace from the string.

I have made the following flow, please check it for a reference.

In action Compose2, input the following code to add “0” before the string and remove the leading whitespace from the string.

concat('0',trim(body('Get_response_details')?['r514df089a75647199268abd10ef0be4e']))

1.PNG

Please take a try with it on your side.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi @sjehanzeb,

 

It seems that you would like to add “0” before the string and remove the leading whitespace from the string.

I have made the following flow, please check it for a reference.

In action Compose2, input the following code to add “0” before the string and remove the leading whitespace from the string.

concat('0',trim(body('Get_response_details')?['r514df089a75647199268abd10ef0be4e']))

1.PNG

Please take a try with it on your side.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,321)