cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CPittman
Frequent Visitor

How to concatenate MULTI line text fields (example 3 fields) into ONE multi line text field - SharePoint List 365

Hi Friends,

I've been googling and hitting walls. I even posted my question on Microsoft's Q&A who referred me directly to you all. To level set expectations, I'm new to this and have not been provided formal training. 

 

I'm trying to update a SharePoint 365 list. I have three multiple line text fields. I have a fourth field that's a multiple line text field which remains blank. I want to concatenate fields, 1-3 (in that order) into field 4. I've found concatenating formulas for single line text fields but NOT multi line. See below example of what I'm attempting to do. According to Microsoft, this must be done using Power Automate. I need help to build an automated flow where each time a SharePoint list item is modified or created, field 4 is populated with the result of fields 1-3 being concatenated. Please refer to the example I'm trying to attempt to accomplish in this chart, below.


Field 1Field 2Field 3Field 4 (Result of concatenation)
Today is before tomorrow. Tomorrow is after today. This morning was before this afternoon, but this evening is after this afternoon.Eat fruits and vegetables routinely & daily to help reverse type 1 and type 2 diabetes. The disease is caused by a consistently poor diet and have studies to prove it can be reversed by eating a healthy.How can I concatenate fields 1-3 and reflect the concatenated result within field 4?Today is before tomorrow. Tomorrow is after today. This morning was before this afternoon, but this evening is after this afternoon. Eat fruits and vegetables routinely & daily to help reverse type 1 and type 2 diabetes. The disease is caused by a consistently poor diet and have studies to prove it can be reversed by eating healthy. How can I concatenate fields 1-3 and reflect the concatenated result within field 4?
 

How can I concatenate MULTI line text fields (example 3 fields) into ONE multi line text for a SharePoint List in 365 via Power Automate?

14 REPLIES 14
pjohnson8700
Frequent Visitor

I have the same question!

Pauline

Chriddle
Super User
Super User

Build a web flow like this:

  1. "Get items" from your Sharepoint list
  2. "Apply to each" of these items
  3. "Update item" with the original values exept the result column.

For the result concatinate the ofther multiline values with following expression, where decodeUriComponent('%0A') is a line break. Remove it, if not needed.

 

concat(
	item()?['Multiline0'],
	decodeUriComponent('%0A'),
	item()?['Multiline1'],
	decodeUriComponent('%0A'),
	item()?['Multiline2']
)

 

 

Chriddle_0-1676485469332.png

 

 

It didn't work. For some reason, it doesn't error out, but it doesn't do anything either. Here's what I did to try to mimic your suggestions: 

CPittman_0-1676482507979.png

CPittman_1-1676482563661.png

CPittman_2-1676482629491.png

In the Concatenated field, which is my Accomplishments field, I have the following formula: 

concat(item()?['Challenge_x0028_s_x0029'],decodeUriComponent('%0A'),item()?['Action_x0028_s_x0029'],decodeUriComponent('%0A'),item()?['Result_x0028_s_x0029'])

Goal: To concatenate my Challenge(s), Action(s) and Result(s) fields (in that order) into the Accomplishments field. It's not doing anything. Something to note... I did input information in the accomplishments field and ran the flow. The flow removed anything I typed into the Accomplishments field.

 

Any other suggestions? Did I miss something? Again... I'm new to all of this but intrigued so I'm here! 

 

 

Chriddle
Super User
Super User

Sorry, my assumption was that you do this in a Select action 😖

In your case the value "item()" in my expession above must be replaced with "items('Apply_to_each')"

I'm sorry... I tried to give what information I could; I didn't mean to confuse you! On that note though, I modified the expression to reflect the following as you suggested: 

concat(items('Apply_to_each')?['Challenge_x0028_s_x0029'],decodeUriComponent('%0A'),items('Apply_to_each')?['Action_x0028_s_x0029'],decodeUriComponent('%0A'),items('Apply_to_each')?['Result_x0028_s_x0029'])

...it ran the flow with no errors, but it didn't actually concatenate the three columns into the accomplishment's column. The list still has blank accomplishments. So fun right!? 😒

Chriddle
Super User
Super User

It was my fault. I wrote "Apply to each" (which is correct) but then had a select in mind 😉

 

Are you sure that the name of your column name is Challenge_x0028_s_x0029 in this context?

Remove the question mark in ('Apply_to_each')?['Challenge_x0028_s_x0029'] and check if this property really exists or if the flow runs into an error.

CPittman
Frequent Visitor

Appreciate your prompt response! I removed the ? marks. I somehow forgot the _ character at the very end of each of my column names which I found out when it flagged the error. so, thank you for that. 

 

Once the above was corrected, it worked but the problem now is, after it concatenated the three columns into one, it keeps going back and removing them. 😲  Do I need to add the ? marks back in?

Chriddle
Super User
Super User

after it concatenated the three columns into one, it keeps going back and removing them

Sorry, I don't get that.

 

The question mark is not related to your problem.

The purpose of the question mark is to return null if the referenced object property does not exist (instead of a flow crash).

 

Agreed... it's super strange. I even tried it by adding the ? back in and you're right; it's not to do with that. I've ran it 5 times since and it's concatenated and then wiped the column clean. Gahhhh I was so pumped when it worked and then that keeps happening. 

 

I just came across this from six years ago and am curious if it's the same known issue: Ability to update just changed field for SharePoint items . 

Additional Information: 

  1. The Manual Flow we've been working through
    1. The Flow checker says, "Updating action 'Get items' to use OData filter queries can improve the performance of your flow. I have no clue what this is. 
    2. The flow still populates the accomplishments field in the concatenated way we set out for but then immediately after, wipes the accomplishments field clean; leaving blank accomplishment boxes again.
  2. I decided to create an automated flow with nearly the SAME information.
    1. Results:
      1. The concatenate formula you supplied worked in this flow too.
      2. It doesn't leave blank accomplishment fields and it doesn't go back and empty them.
        1. It does, however, seem like it never stops running!
        2. Flow checker tells me, "Redesign your flow to use fewer actions of this connector 'SharePoint' to reduce the chances of hitting the throttle limits. 
        3. My flow is as follows but the main question now is- how do I redesign this flow to ONLY update the accomplishments field if creating a new item or modifying the Challenge(s), Action(s) and Result(s) fields only with fewer actions?
          1. The rest of the columns being modified at any point do not affect my concatenation field (Accomplishment(s)) at all. So, I don't need the flow to check those.
        4.  

          CPittman_9-1676665839495.pngCPittman_7-1676665691912.pngCPittman_8-1676665790784.png

          The concatenate formula I used is this:

          concat(items('Apply_to_each')?['Challenge_x0028_s_x0029_'],decodeUriComponent('%0A'),items('Apply_to_each')?['Action_x0028_s_x0029_'],decodeUriComponent('%0A'),items('Apply_to_each')?['Result_x0028_s_x0029_'])

Let me know what you think or if I should create an entirely new thread for the throttle/fewer actions issue. Appreciate you!

-Christy

Chriddle
Super User
Super User

Using the trigger "When an item is created or modified", you already get the item. You don't need the "Get items" action anymore.

Since this is only one item you don't need the loop ("Apply to each") anymore.

With removing the "Apply_to_each" you have to change the objects in your flow.

 

A problem is, that you update this item and this triggers the flow again, because you modified an item 😉

Therefore you should check if your column already is correct and only update the item if you have to.

I thought I understood the concept you just described but when I've tried to re-write the flow, I am fudging it up. I read the above and removed the Get Items and Apply to each; figuring I could add conditions in but I'm back to hitting a brick wall. Everything I have attempted continues to error out and it just comes down to my lack of fully knowing how to use Power Automate. 

 

Current State - 

For those trying to follow along and are learning as I am, I'm attempting to fix my previous flow to 1) automatically check to see if my Challenge(s), Action(s), and Result(s) columns have been created or modified, then 2) concatenating those three columns into my Accomplishments field (in the same order I expressed above) as needed (not every time the flow runs). Concatenation worked but I'm unable to get my flow to stop running infinitely. 

jdoss
Responsive Resident
Responsive Resident

To stop the flow from continuously running, you need to check before you update. So if the appraisals column is not empty or already is equal to your concatenated string, do nothing (flow will not trigger again) or update (flow will trigger but next time it won't). You could also add a column with a Yes/No value automatically set to No, then when you update the value also change this to Yes, then you only have to check if the column is set to No before continuing and if it is Yes, you can terminate the flow.

I thought I was doing it when I changed my flow to the following. It runs successfully but hits that limit threshold again. So clearly, I'm still missing something. How would you suggest fixing this? 

CPittman_0-1676992452602.png

Source Field I used: 

  • sub(int(triggerOutputs()?['body/{VersionNumber}']),1)

Conditions I used:

  1. Condition 1: "Has Column Changed: Challenge(s)" is equal to "Until Version Number" with the assumption that it's looking to see if my Challenge(s) column has been changed based off of the last version
  2. Condition 2 I have: "Has Column Changed: Action(s)" is equal to "Until Version Number"
  3. Condition 3: "Has Column Changed: Result(s)" is equal to "Until Version Number"

CPittman_1-1676992734027.png

Then I had a get items and apply to each where it concatenates the fields ... 

It runs but it's hitting that threshold again (where I assume the apply to each is my problem). How would you suggest altering this based upon your input above? Also- thank you and Chriddle, for your support. 

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (4,917)