Skip to main content

Notifications

Copilot Studio - General
Answered

Help with Concat in Compose (data operation)

Posted on by 14

Can someone please help me in understanding what's the issue with Concat expression in the below picture:

pic11.jpg

 

I hope it is clear from the above picture. But, please do ask any further questions needed to find the error. Thanks!

Categories:
  • DiegoPeres Profile Picture
    DiegoPeres 327 on at
    Re: Help with Concat in Compose (data operation)

    I had a little time and made the line break:

    For this it was necessary to use the Split function, the code looked like this:
    Split(concat(items('Apply_to_each')?['Title'], ': ',
    items('Apply_to_each')?['Product1'], ', ',
    items('Apply_to_each')?['Product2'], ', ',
    items('Apply_to_each')?['Remarks']),',',')


    The result looks like this:

    [
      "Fruits: Apple",
      " Orange",
      " I love juice!!! My favorite juice is mango but I like all fruits\neven the most exotic i like jabuticaba"
    ]
    DiegoPeres_1-1633381747163.png

     


    DiegoPeres_0-1633381717474.png

    Did I answer your question?😉
    Please consider accepting it as the solution to help other members find you faster.


    Like my answer?


    Like it! 👍



    Thanks!
    Diego Peres,
    Connect with me: Linkedin

  • TKS0001 Profile Picture
    TKS0001 14 on at
    Re: Help with Concat in Compose (data operation)

    No worries! Please take your time @DiegoPeres  

    Thank you again and have a nice remaining day!

     

     

     

  • DiegoPeres Profile Picture
    DiegoPeres 327 on at
    Re: Help with Concat in Compose (data operation)

    Good, Very good!!!

    I'm glad it worked for you!!!

    I will create a scenario like you showed below, but I won't be able to do it today, but I can do it tomorrow

  • TKS0001 Profile Picture
    TKS0001 14 on at
    Re: Help with Concat in Compose (data operation)

    Hey @DiegoPeres  This is so great! Your concat expression worked like charm 

    concat(items('Apply_to_each')?['Title'], ': ',items('Apply_to_each')?['Product1'], ',',items('Apply_to_each')?['Product2'], ',',items('Apply_to_each')?['Remarks'])

     

    I can see the output like this:

     Result1.jpg

     

    I was going to mark your reply as 'Accept as Solution' however then thought to check with you if you somehow also know and help me in outputting the result as shown below:

     

     

    Result2.jpg

    i.e. each field in a separate line and also if the multiline field can show as multiline instead of showing in 1 line.

     

    Please let me know if this takes time and is not an easy solution. I can mark your reply as the solution and maybe open a new thread.

     

    In any case, THANK YOU! again!

  • Verified answer
    DiegoPeres Profile Picture
    DiegoPeres 327 on at
    Re: Help with Concat in Compose (data operation)

    Hi,@TKS0001 I made a simulation in your scenario:

    DiegoPeres_1-1633374252390.png

     

    DiegoPeres_0-1633374227028.png

     

    Where the user reports a data, which is in the Title column, I did the concat this way:

    concat(items('Apply_to_each')?['Title'], ': ',items('Apply_to_each')?['Product1'], ',',items('Apply_to_each')?['Product2'], ',',items('Apply_to_each')?['Remarks'])


    And the result was: Fruits: Apple,Orange,I love Juice


    Look at the prints:

    DiegoPeres_3-1633374428687.png

     

    DiegoPeres_2-1633374370652.png

     


    Did I answer your question?😉
    Please consider accepting it as the solution to help other members find you faster.


    Like my answer?


    Like it! 👍



    Thanks!
    Diego Peres,
    Connect with me: Linkedin

     

  • TKS0001 Profile Picture
    TKS0001 14 on at
    Re: Help with Concat in Compose (data operation)

    Hi @DiegoPeres  Thanks for looking into it. Much appreciated!

     

    As requested, here's the SharePoint list & error detail. Though there is no error as such, it just does not show the concated information

     

    SharePoint List - with Columns as:

    Title – Single line of text

    Product1 – Single line of text

    Product2 – Single line of text

    Remarks  â€“ Multiple line of text

    SP1.jpg

     

    Here is the screenshot of result:

    Result1.jpg

     

    As highlighted above, it just shows the 'Title' field only and not other concated fields:

    Concat(item()?['Title'],item()?['Product1'],item()?['Product2'],item()?['Remarks'])
     
    I hope this helps in understanding the issue!

     

     

  • DiegoPeres Profile Picture
    DiegoPeres 327 on at
    Re: Help with Concat in Compose (data operation)

    Hi @TKS0001 
    can you post the error that is occurring when processing the function? If possible also post the header of your Sharepoint list.

     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,287

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,172

Leaderboard