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

Handling SharePoint columns with multiple values.

As I understand FLOW currently might not be supporting the "Person or Group" columns in SharePoint, but I tried to get around the problem by passing "email" of persons present in the "Person or Group" column into a destination single line text field and then writing a native SharePoint workflow to populate that email into the "Person or Group" column in my destination item. This works fine even if the "Person or Group" has more than one person present in the source column, the FLOW basically takes each person and writes into teh destination list one row for each person (I am fine with that in my special requirements).

 

Please see my FLOW diagram below. This runs when an item is "added or modified" on source list, and it adds/updates the item in destination. (The 'add' vs 'update' decision is made by comparing the "created" and "modified" timestamps). The "addition" part works perfectly i.e. if I add an item in souce list and assign that to two users (say user A and B), then the "Add" operation adds two items in destination list (one for user A and other for user B). When I "update" the source list then in the FLOW I  identify the destination item by comparing the "ID" of the source list item stored in destination item during the "Add" operation). During this "update" process although the FLOW does update the two items on the list D, but for both the items it updates the user as "B" even though the source has A and B both. The expectation was that it will take both users from the source list and update the destination list one by one for each user ID.

 

Thanks for the guidance.

 

FLOW-2.png

 

7 REPLIES 7
Responsive Resident
Responsive Resident

Hi,

The way I handled this is by using a people picker in the list that allows multiple values.  

then I initialize a variable, then an apply to each to load the variable from my assignedTo:

the set variable is simply the var name...

then i do my alerting using the variable as the list of recipeints...

 

the code in the concat is:

concat(item()?['Email'],';',variables('FinalAssignedTo'))

initializeApply2Each.JPG

 

Hope this helps,

Joe

Regular Visitor

Thanks Joe. This is a great idea.

 

I was able to pass all the emails in a single field utilizing your technique. But when my native workflow tries to populate this list of emails (separated by semicolon) into the actual "Persons and Group" field then the native worflow fails with unhandled exception. This native workflow works great for single emails address. My native workflow as below.

 

Workflow-1.png

 

 

 

What goes in set variable.

The workflow is updating two fields in the list:

 

1. The URL column (since the FLOW does not pass "description" along with the URL, so I'm using native worflow to populate description).  This is what goes into the set variable.  This bit works fine without any issues.

 

2. Update the "Assigned to" (a "Persons or Group" type column) with the email values (semicolon separated) present in a text column (assigned_to_email).  This works for one email, but if there are more than one email the workflow fails.

 

 

 

 

flow.png

Sorry i was just looking answer for 1st part of your problem. I wanted to save a string in Database. 

Sending email to multiple people and storing multiple emails in a single column is not an issue.

 

The issue is how do we populate "Persons and Group" field from our list of emails. The FLOW doesn't support "Persons and Group" so we are doing it via a "native workflow" in SPD. It works for single email but does not recognize multiple emails. I haven't tried comma separated email list instead of semicolon separated. May be the answer is as simple as that.

 

Going to sleep now, have to drop son at school early in morning for their trip to Hershey's park :). I like personal bits in office messages to keep the thread "lively" 🙂

 

Thanks for responses.

Regular Visitor

So far couldn't get it to work with separators like commas, semicolons, ";#" etc.

 

Also tried passing the "DisplayName" instead of EMail e..g. concat(item()?['DisplayName'],';0;#',variables('FinalAssignedTo'))

 

Nothing worked so far. When our string contains user emails of users A and B (like A;0;#;B;0;#) then when we populate this string into our "Persons and Group' column (using the native worklow as above) it gets pupulated with only one user (the user B in our example).

 

I wish Microsoft Flow supports the "Persons and Group" column soon to avoid spending so much time on workarounds.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (13,355)