cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IT_Matt
Advocate I
Advocate I

How do I add white space and line feeds to a variable for logging comments in SharePoint Column

Hello All,

 

I'm trying to get approval comments and summary to be added to a multi line column in a SharePoint List. Basically the approval record is sent and response comments and the summary are added to a SharePoint column, but the problem is the comments are all bunched together which makes it hard to read. I would like each response comment to be on a separate line with some white spaced added between the comments.  

Also to note that I tried this solution and as mention it is no longer working and I could not get the "concat" formula to work either. (expression error) 

https://powerusers.microsoft.com/t5/Building-Flows/MS-Flow-expression-how-to-concatenate-New-Line-in... 

This the SPO Column and yellow is response comment and orange is response summary with no white spacing or line feedThis the SPO Column and yellow is response comment and orange is response summary with no white spacing or line feedThe flow that builds tries to append line feed and white spacingThe flow that builds tries to append line feed and white spacing

12 REPLIES 12
efialttes
Super User
Super User

Hi!

My suggestion is, on your 'Set variable' action block...

-either try to add a new line by hitting 'enter' just after the dynamic content output you assigned as its current value ('Responses comment' , right?)

Or, try to add a new line by adding <br>, but in this case, you will probably need to activate 'Rich text' in your column definition, as explained here

https://www.sharepointeurope.com/rich-text-column-sharepoint-document-library/

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



v-litu-msft
Community Support
Community Support

Hi @IT_Matt,

 

You could add the URI code "%0A" between the sentences you want to break line, then use the decodeUriComponent() function to decode it, for Example:

Add lines between your text with the URI code.%0AThis code your text better and makes it easier to read.

Result:

Add lines between your text with the URI code.

This code your text better and makes it easier to read.

 

Annotation 2020-04-16 105034.png

 

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

@efialttes I'm not sure I understand your suggestion. I review the link and it is an older version of SharePoint and I'm on SharePoint Online. As for adding a line by pressing enter, if you review the image you can see I've added that but Flow ignores it. I had a space at the top and between the variable and "response comments" but both were removed or ignored. I even tried quotes with a space and that didn't work either. Your suggestions are greatly appreciated. 

Hi!

Sorry for my English. I was referring this

Flow_HitEnter.jpg

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@v-litu-msft I also tried the "%0A" and it was unsuccessful. I'm unfamiliar with that URI code so I even tried it with a zero and capital "O" ("%OA") since I didn't know which was correct.

Thank you for your response and l look forward to any other suggestions or feedback. 

1st thanks for responding and your English is fine! @efialttes 

 

Unfortunately, I try adding that carriage return (enter key) to the "set variable" but that was unsuccessful. I also tried adding to the "Compose" and "Append to String" actions (pictured in my first post) and that was unsuccessful.  

Thank you for your response and l look forward to any other suggestions or feedback.

Were you two able to get your suggestion to work on your tenant? If so, I might have a reason why it's different on mine.

@efialttes @v-litu-msft 

efialttes
Super User
Super User

Weird.

There must be something really simple we are missing...

wait, wat, wait.. how are you handling more than one response with current Apply to Each? I mean, why 'Update item' inside the 'Apply to Each'? Can you share a screenshot of 'Update item' design details?

THanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi @IT_Matt,

 

It is "%0A", 

Add lines between your text with the URI code. %0AThis code will make your text better and makes it easier to read.
decodeUriComponent(outputs('Compose'))

 Run result:

Annotation 2020-04-21 174128.png

 

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

Update SPO List item after each responseUpdate SPO List item after each response

Hi @IT_Matt,

 

Thank you for your screenshot, just as I said, please input the expression into the Update item action, not append the output of Compose directly. The "%0A" should decode by the following expression, then the line will break:

decodeUriComponent(outputs('Compose'))

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

 

@v-litu-msft Thank you for extending your help to help me resolve this! 

 

Unfortunately, it's still hasn't worked.

I'm posting the screenshot of the output in the "Notes" column of the SPO List. I'm also posting the screenshot of the adjusted code in the "Update Item" to see if I'm missing something. 

 

highlighted the changes in my flowhighlighted the changes in my flow

Notes column of my SPO ListNotes column of my SPO List

 

Thank you, again for your assistance. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,185)