cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

How to remove an Enter from a string

Hi.

 

I'm trying to find some text in files on Sharepoint. For that I used "Send HTTP request to Sharepoint". Once I get Result is shows search in HTML format. I convert it to text, but after that I realize that path to the file contains "enter". And step - get file content  using path failed.

Search in SP p2.PNG

 

I tried to use "replace", but it didn't help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: How to remove an Enter from a string

@Daniil  please follow this

 

libe.PNG

 

see when you use uriComponent  you have this %20%0A%0A string that means your like  break. Then you just can replacte this to delete it from your line.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: How to remove an Enter from a string

hi @Daniil  enter is a line break like this

 

12123123

 

12312312

 

that blank space is a line break for me, it is for you the same as enter?

 

if is yes please use this expression

uriComponentToString(replace(uriComponent(body('Html_to_text')), '%0A', ''))

 

you can follow more info here https://powerusers.microsoft.com/t5/Building-Flows/Replace-Newline-in-Flow-Expression/td-p/57333



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
Helper I
Helper I

Re: How to remove an Enter from a string

@ChristianAbata hi. 

yes. The problem is that when I get a substring from converted text it in some cases shown like:

 

”https://....../folder 

xxx/filename.pdf”

 

if I use this substring in get file content it shows error due to line breaker.

i made a test removed it, so line looks like:

 

”https://....../folder xxx/filename.pdf”

 

and it worked properly. So I’m looking for a way how to remove that line breaker.

 

Highlighted
Super User III
Super User III

Re: How to remove an Enter from a string

Hi @Daniil 

 

Use a Split expression then iterate the values and map in next step.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Highlighted
Super User III
Super User III

Re: How to remove an Enter from a string

@Daniil  please follow this

 

libe.PNG

 

see when you use uriComponent  you have this %20%0A%0A string that means your like  break. Then you just can replacte this to delete it from your line.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
Helper I
Helper I

Re: How to remove an Enter from a string

Hi, tried your solution, but that didn't work for me.

 

As a result I got as an input on a second compose -

Path%2FFolder%0AXXXXX%2F2020%2F05%2F103_120520_PP200512-0508418.pdf

 

Instead of Path/Folder XXXXX/2020/05/103_120520_PP200512-0508418.pdf

Highlighted
Helper I
Helper I

Re: How to remove an Enter from a string

On a step "get file content using path I added replace function to output from Compose replacing %2F by "/" and it worked 🙂

 

Thanks 🙂

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (3,614)