Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Y1Q5GbPVVdWI5jSvljAPDN
Power Automate - Building Flows
Answered

Removing brackets from a Compose Output

Like (0) ShareShare
ReportReport
Posted on 9 Mar 2021 11:03:19 by 7

Hi.

 

Basically I am trying to get entries from multiple SharePoint lists and join them all together in an XML file. 

 

Get items from list 1.

Apply to Each list 1 - this gets the Title from each list item.

Compose 1 - put Title inside the XML elements.

 

Get items from list 2

Apply to Each list 2

Compose 2

 

I then have a final Compose that puts  Outputs 1 and 2 inside the XML headers. 

I end up with all the XML  I want but it  also includes square brackets.

 

<?xml version="1">

<element>

[" <element2>title1</element2>"]

["<element2>title2</element2>"]

</element>

 

Is there any way to prevent or remove these square brackets? 

  • tinyellie Profile Picture
    7 on 09 Mar 2021 at 14:38:25
    Re: Removing brackets from a Compose Output

    I had to initialize a variable to turn the array output into a string and then it worked. Thank You! 

  • Verified answer
    Paulie78 Profile Picture
    8,407 Super User 2025 Season 1 on 09 Mar 2021 at 11:53:15
    Re: Removing brackets from a Compose Output

    In a compose action:

    replace(replace(outputs('withBrackets'), '["', ''), '"]', '')

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard
Loading started