cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tylermontney
Regular Visitor

Concat two people columns

I tried the solution here but it didn't work: https://powerusers.microsoft.com/t5/General-Power-Automate/Concatenate-columns-from-list/td-p/294592

  • Details of Get Items isn't visible. I tried selecting my two columns from Filter Query, but that causes Get items to fail.
  • I could only find Compose, whereas the image shown says ComposeConcat. It looks like the same action.
  • Update Item has Title as a required field. I tried limiting columns by view, and that changed the required field from Title to Item. However, my flow ran but never finished on Apply to Each.

My goal is to add all People items from columns 1 and 2 to column 3. I want the whole People object, not just the display text.

1 ACCEPTED SOLUTION

Accepted Solutions

Check this video, same flow, but works for multiple people column:

https://youtu.be/9yYxBtNgD_M

 

View solution in original post

13 REPLIES 13
eric-cheng
Solution Sage
Solution Sage

Hi @tylermontney 

 

Without seeing what has been done, here are some tips:

 

1. Get Items will return rows within a SharePoint list.  Check the filter you are using.  Feel free to post a screenshot. 

 

2. Same action, the blog just renamed it

 

3. By default, the Title column of a SharePoint list is a required field. Check this link out to make it not a mandatory field.

ScottShearer
Super User
Super User

@tylermontney 

You are required to update any required columns in a SharePoint list when using Update item.  So, If you don't want to update the column, simply select Title from a previous Get Item action.  This will insert the existing value - no net change.

You see ComposeConcat because the Flow author changed the default name of the Compose action for clarity (good practice).  To rename an action, go to the three dots (ellipses) at the top right of the action and select Rename.

 

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

Scott

I think that Concat action isn't actually applicable. It's probably meant for strings, not objects. (Although, each Person object is JSON so maybe it'd work?)

@tylermontney 

Here is a blog post that should put you in the right direction.

The data required to create the array is available in Dynamic properties.

 

 

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

Scott

Update Item is not completing. Despite running for over 6 minutes, the two retry attempts (for that step) claim they ran for 1 second or less with a result of "BadGateway".

 

  1. On created (will eventually expand to Updated)
  2. Initialize two variables (otherwise the array gets nested and breaks the Person object)
    1. A string to hold a dictionary with one key
      1. { "Claims": "myemail@domain.com" }
    2. An array to hold each single-key dictionary
      1. [
        { "Claims": "myemail@domain.com" },
        { "Claims": "myemail1@domain.com" }
        ]
  3. Loop through both Primary and Secondary to get the emails
  4. Add each as a JSON string to the variables
  5. Update the SharePoint Person column

 

firefox_ie6ppoQlZV.png

 

Here's the raw input on the final step:

 

{
"host": {
"connectionReferenceName": "shared_sharepointonline",
"operationId": "PatchItem"
},
"parameters": {
"dataset": "https://my.sharepoint.com/sites/test",
"table": "f123a1-eeee-abcd-1234-1234abcd",
"id": 19,
"item/Title": "test",
"item/AllMembers": [
"{ \"Claims\": \"myemail@domain.com\" }",
"{ \"Claims\": \"myemail1@domain.com\" }"
]
}
}

Paulie78
Super User
Super User

Hi @tylermontney 

 

I took a look at your flow and it is quite complex for your requirement. I built a flow that does what you want and recorded a video of how to do what you are trying to achieve. Please check this out and see if it helps you:

Update multi-person column with Power Automate 

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

@Paulie78I should mention that all of my Person columns need to

  • Allow multiple Selections
  • People and Groups

It’s almost the same - will modify it for you.

firefox_krXaf4Usuc.png

 

Where 'Compose 2' is substring(variables('Claims'),0,sub(length(variables('Claims')),1)). It runs successfully but changes nothing. The inputs on the final step are valid JSON, looks just like yours. In the outputs it's just an empty array.

You really don’t need all those variables or the loop. I will upload another video - I’m playing tennis at the moment so it’s rather tricky 😃

Check this video, same flow, but works for multiple people column:

https://youtu.be/9yYxBtNgD_M

 

View solution in original post

I'm confused. The other solution I tried had its inputs JSON that looked exactly like yours, yet it applied nothing. I know my flows were a bit over-complicated, new to Power Automate.

Hi @Paulie78 ,

I just responded as a comment on your video, but I figure I would take the conversation here so I can use screen shots-

From youtube: "Hi Paulie, any ideas what may cause an error that reads "BadRequest. The 'from' property value in the 'select' action inputs is of type 'Object'. The value must be an array." for the first "Select" operation? I am pretty sure I am following the video as close as i can with my dataset and keep hitting a wall with this no mater what I try. Thanks so much!"

linds787_0-1634248597034.png

 

Please let me know if you need further screenshots or info about my dataset.

 

Thanks so much!

Lindsey

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,276)