cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
warren
Level: Powered On

How to produce a multi-line text in a list using flow

Hi,

 

I have a scenario where the following needs to happen in sequence:

 

1) A sharepoint list (e.g.: 20 individual rows) is maintained in sharepoint. 

2) In Flow, i need to take a specific column of the sharepoint list in 1), and produce a new sharepoint list which has 1 row. The individual values from the multiple rows of the column of interest need to somehow be concanetated into mutliple line text (text 1;text2;text3...) in a single field.

 

I've tried with Flow, and the 'for each' function which it automatically adds does not work. It takes the individual value and process them one at a time - this creates brand new entry for ALL the records, rather than a single field with concatenated records.

 

Have someone tried out this similar concept with Flow before?

Or is it something that's not currently supported?

 

Help much appreciated!

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: How to produce a multi-line text in a list using flow

Hi @warren,

 

Could you please share a screenshot of your flow’s configuration?
I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add “Get items” action, specify Site Address and List Name.
  • Add Variables-> “Initialize variable” action, Name set to ConcanetatedNames, Type set to String, Value set to null.
  • Add a “Apply to each”, input parameter set to output of “Get items” action.
  • Within “Apply to each”, add “Compose” action, Inputs set to the following formula:

 

concat(variables('ConcanetatedNames'),item()?['EmpName'],';')

 

  • Add a “Set variable” action, choose ConcanetatedNames in Name field, Value set to output of “Compose” action.
  • Add “Create item” action.

Image reference:2.JPG

 

3.JPG

 

4.JPGThe flow works successfully as below:5.JPG

6.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: How to produce a multi-line text in a list using flow

Hi @warren,

 

Could you please share a screenshot of your flow’s configuration?
I have made a test on my side and please take a try with the following workaround:

  • Add a proper trigger, here I use Flow Button trigger.
  • Add “Get items” action, specify Site Address and List Name.
  • Add Variables-> “Initialize variable” action, Name set to ConcanetatedNames, Type set to String, Value set to null.
  • Add a “Apply to each”, input parameter set to output of “Get items” action.
  • Within “Apply to each”, add “Compose” action, Inputs set to the following formula:

 

concat(variables('ConcanetatedNames'),item()?['EmpName'],';')

 

  • Add a “Set variable” action, choose ConcanetatedNames in Name field, Value set to output of “Compose” action.
  • Add “Create item” action.

Image reference:2.JPG

 

3.JPG

 

4.JPGThe flow works successfully as below:5.JPG

6.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

warren
Level: Powered On

Re: How to produce a multi-line text in a list using flow

Awesome!

This is EXACTLY what i'm after.

 

Thanks @v-xida-msft!

 

 

Warren

Lexnnn
Level: Powered On

Re: How to produce a multi-line text in a list using flow

I wanted to provide all the emails of the group owners in 1 field in the approval email. The group owners are stored in the Sharepoint list. This should only happens when a new line to the list is added so I avoid using "Get items"

 

I have found similar solution as the one described here was not working for me (I could not figure it out to be honest).

 

Before my "Start approval" part I have created "Initialize variable (name of variable + type "String").

 

Below and still before my "Start approval" I have added "Apply to each" (output is "Group owners" field).

 

Inside the "Apply to Each" I have added "Append to string variable" (Name = variable name from initialize and value is "Group owners email" field = what I want to display and " ; " as separator) 

 

Below in the "Start approval" email text, I have added the variable to display it.

 

variable group owners emails.png 

 

Hope this helps someone.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users Online
Currently online: 170 members 4,932 guests
Please welcome our newest community members: