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 / Concat function empty ...
Power Automate
Answered

Concat function empty value and separator

(0) ShareShare
ReportReport
Posted on by 5

Hi All

 

Trust someone can help me out

Scenario

I have 3 columns in the sharepoint list, which I want to combine using a powerautomate flow.

 

In the flow, I am using Concat function as below with a separator

 

concat(triggerOutputs()?['body/Group1'],', ',triggerOutputs()?['body/Group2'],',' ,triggerOutputs()?['body/Group3'])

 

Group1: Test 1, Test 2

Group2: empty column

Group3: Test3, Test4

 

The output is: Test 1, Test 2, ,Test3, Test4

 

I need to remove the extra separator if any of the columns are empty.

 

Thanks in advance

 

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,995 Super User 2026 Season 1 on at

    Hi @Shefimonbasheer ,

     

    The flow will need to handle a combination of blank values, for example:

    Snag_73a3b2.png

    One solution could be to put the values into an array (using createArray function), filter out blank values (using Filter Array function) and then joining the remaining values as a string separated with a comma (using the Joing function):

     

    createArray(variables('triggerOutputs')?['body/Group1'], variables('triggerOutputs')?['body/Group2'], variables('triggerOutputs')?['body/Group3'])

     

    Snag_7a341e.png

    Here is the sample runtime output:

     

    Snag_7d28d5.png

    Snag_7d8f6e.png

    Snag_7dea31.png

     

    Snag_81d0d9.png

     

    Hope this helps.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • ShefiBasheer Profile Picture
    9 on at

    @ekarim2020 

    Hi Ellis

     

    Thank you so much for the detailed explanation, and the solution worked. In my flow the, group1, group2, and group 3 are from a SharePoint list, so the initialize variable I had to add separately, I am not sure that is the correct method, and in the filter array applied this 

    createArray(variables('Group1'), variables('Group2'), variables('Group3'))

    Untitled.jpg

     Regards

    Shefi

  • Verified answer
    Ellis Karim Profile Picture
    11,995 Super User 2026 Season 1 on at

    Hi @ShefiBasheer ,

     

    I had a chance to test this with an existing SharePoint list where I added with three text columns Group1, Group2 and Group3.

     

    The createArray action will be:

     

    createArray(triggerOutputs()?['body/Group1'], triggerOutputs()?['body/Group2'], triggerOutputs()?['body/Group3'])

     

     

    As the data source is SharePoint and not a variable as in my previous example, you will need to modify the Filter array to remove null values:

     

    Snag_407074c.png

     

    The reason is that if no value is entered for Group1, Group2 or Group3 - then those Properties will be missing from the triggerOutputs. For example, if no text for the Group2 column was entered (i.e. it is left blank):

    Snag_40e9486.png

     

    the property Group2 is missing from the triggerOutputs:

     

    Snag_40c9e15.png

    Based on the above values for Group1 (Test 1, Test 2), Group2 (which is empty) and Group 3 (Test3, Test 4), the createArray action will create an array with the following values; the missing property value will be set to null

     

    [
     "Test 1, Test 2",
     null,
     "Test3, Test4"
    ]

     

    The filter array acton will remove the null values:

    Snag_41414d9.png

    Here is a sample runtime output of the filter array action:

    Snag_4159010.png

    Snag_416252b.png

    Try the above and see how you get on with your List.

     

    A final note, you could also create the array in a variable:

    Snag_41d43fc.png

    Hope this helps. 


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

  • Shefimonbasheer Profile Picture
    5 on at

    @ekarim2020 

    Hi Ellis

     

    Tested and worked. Thanks again😊

     

    Regards

    Shefi

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard