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 / Concat Output to Share...
Power Automate
Unanswered

Concat Output to Sharepoint list - How to get rid of square brackets

(0) ShareShare
ReportReport
Posted on by

Firstly thank you in advance for your help!

 

I've created a flow that updates a SharePoint list. 

 

To merge the old and new values (in my case Opportunity IDs) I have used the below concat function. This seems to work fine and when tested the output displays as I would like without any brackets. 

 

concat(outputs('ExistingSFDC'),' ', outputs('NewSFDC')) - I have called this MergedSFDC
 

However, when I then add the step to my flow to update my Sharepoint list (adding 

outputs('MergedSFDC') to my selected column) the output shows as the following in SharePoint:

 

["21723748 123456"]

 

I tried to use the replace function to get rid of the brackets, entering it into the field (SFDC) I want to fill in Sharepoint.

 

replace(replace(outputs('MergedSFDC'),'[',''),']','')
 

but that produces the following failure:

 

Unable to process template language expressions in action 'Update_item' inputs at line '0' and column '0': 'The template language function 'replace' expects its first parameter 'string' to be a string. The provided value is of type 'Array'. 

 

Does anyone know how to get rid of the brackets? 

 

Many thanks 🙂 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    I have also tried the following expression:

     

    replace(replace(string(outputs('MergedSFDC')),'[',''),']','')
     
    but the output is still the same
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Anonymous,


    Try to convert it to a string first.

     

    Try something like below:

     

    replace(replace(string(outputs('MergedSFDC')),'[',''),']','')

     

     

    Or you could also use a slice instead:

     

    slice(string(outputs('MergedSFDC')), 1, -1)

     

  • Community Power Platform Member Profile Picture
    on at

    Hi @Expiscornovus ,

     

    Thanks for your quick reply! I've just tried both of your suggested options above but still seem to be having the same problems. The output of the compose works great as can be seen below. 

     

    ghcollins_0-1666967337434.png

     

    But when I then use outputs('SFDCOutput') to update my Sharepoint it still returns the brackets. And shows the exact the same in Sharepoint.

     

    ghcollins_3-1666967525522.png

     

     

     

    ghcollins_1-1666967445864.pngghcollins_2-1666967468521.png

     

    The sharepoint column is a text column, I have also tried switching it to a number column but it still doesn't work.

     

    Do you have any other suggestions? Thanks!

     

     

  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    Hi @Anonymous,

     

    That SFDC is a single line of text field, correct? Or are you using a different type of field?

     

    Can you also share a screenshot of the rest of your flow setup? This might be useful for troubleshooting.

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