web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Reverse uriComponentTo...
Power Automate
Answered

Reverse uriComponentToString

(0) ShareShare
ReportReport
Posted on by 286

Hello 

         i have an expression in compose that converts my html_to_text so that i can remove new lines with the following

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

This works great.

 

However when i try to call the output in a new compose action i get an error 

The template language function 'split' expects its first parameter to be of type string. 
The provided value is of type 'Null'.

My conversion Compose action is called "SingleLine". 

I am using a new compose action to call the Output from SingleLine so i can grab some text.

trim(First(split(last(split(body('SingleLine'),'(desk)')),'Supervisor Name:')))

Am i calling the SingleLine Output wrong? Or is there a step of needing to reverse the uriComponentToString back to something else that i am missing?

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @stephenJames 

     

    can you post the data output from "body('SingleLine')" 

     

    trim(First(split(last(split(body('SingleLine'),'(desk)')),'Supervisor Name:')))

     

  • stephenJames Profile Picture
    286 on at

    @RezaDorrani wrote:

    Hi @stephenJames 

     

    can you post the data output from "body('SingleLine')" 

     

    trim(First(split(last(split(body('SingleLine'),'(desk)')),'Supervisor Name:')))

     


    I cannot post the exact response as it contains sensitive data. However i can somewhat show the output.

    Basically it turns this Html_to_text input

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
    Maecenas ut vulputate mi. Cras posuere eleifend lectus,
    malesuada porttitor mi volutpat vel. Aliquam eu consectetur
    dui. Cras consequat lectus ac metus maximus laoreet. Donec
    tortor diam, viverra vel feugiat ut, gravida sit amet magna.
    Nulla posuere, ipsum quis gravida gravida, risus dui molestie

    into a single line 

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ut vulputate mi. Cras posuere eleifend lectus, malesuada porttitor mi volutpat vel. Aliquam eu consectetur dui. Cras consequat lectus ac metus maximus laoreet. Donec tortor diam, viverra vel feugiat ut, gravida sit amet magna. Nulla posuere, ipsum quis gravida gravida, risus dui molestie
  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @stephenJames

     

    trim(First(split(last(split(outputs('Compose'),'(desk)')),'Supervisor Name:')))


    replace body('SingleLine') with outputs('Compose')

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     

  • stephenJames Profile Picture
    286 on at

    @RezaDorrani wrote:

    Hi @stephenJames

     

    trim(First(split(last(split(outputs('Compose'),'(desk)')),'Supervisor Name:')))


    replace body('SingleLine') with outputs('Compose')

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

     


    That worked perfectly. Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 124 Super User 2026 Season 1

#2
Ellis Karim Profile Picture

Ellis Karim 52 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 50

Last 30 days Overall leaderboard