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 / Split Function in Comp...
Power Automate
Unanswered

Split Function in Compose Returning a String

(1) ShareShare
ReportReport
Posted on by

I have the following function in a Compose step:

split(variables('ChunkOfText'), '/n')

 It doesn't matter what kind of delimiter I use, when I try to use the output into an array, I get an error message saying the output is invalid because it's a String. I'm probably missing a step-- any help?

Categories:
I have the same question (0)
  • v-yueyun-msft Profile Picture
    on at

    Hi , @orangeprince000 

    Please try to use this code [decodeUriComponent('%0A') means '\n']:

    split(variables('ChunkOfText'), decodeUriComponent('%0A'))
     
    split(string( variables('ChunkOfText')) , decodeUriComponent('%0A'))

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

     

     

  • orangeprince000 Profile Picture
    on at

    Unfortunately I'm still getting the same error.Screenshot 2024-06-21 131152.png

  • Muralidharan Profile Picture
    340 on at

    Please follow the below flow.

    muralidharan_0-1718993463085.png

     

    Expression used in Set variable: split( variables('ChunkOfText') , decodeUriComponent('%0A')) 

    The output: 

     

    muralidharan_1-1718993562342.png

     

  • JC-26071827-0 Profile Picture
    2 on at
    Just bumping this up
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
     
    Without running, could you show how you have initialized the array with value ?
     
     Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you! 

  • Suggested answer
    SB-26092301-0 Profile Picture
    2 on at
    I had the same issue, in my case there was an extra space before the the split expression in the compose action, so make sure there are no extra spaces before where you inserted the expression in the compose

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard