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

Notifications

Announcements

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,143 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,143 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard