cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
abd3127
Kudo Kingpin
Kudo Kingpin

Saving data from powerapps to SP lists person/Group column

Hello ,

i need to save the user info in Person/Groups column of my SP list.

I am selecting the data from a Drop down list.

When i do "DD.selected.value' it gives mee error saying that it needs a record to save.

How can i do this??

23 REPLIES 23

At least it's working 🙂 

E.g. nullifying Person fields doesn't even work at all:

{'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
        Claims:"",
    Department:"",
   DisplayName:"",
         Email:"",
      JobTitle:"",
       Picture:""
   }

 

Thanks @v-micsh-msft for this great reference! I have gone back to this many times and it has helped a lot.

 

This helped me achieve a similar goal of creating a new SharePoint list item with an entry in a multi-select person column for each row in a collection which I posted below in case it helps someone else.

 

Essentially, this allows attendance taking without searching for each person's name in the Office365 directory but rather maintaining a  list of "members" to each committee and then offering these as choices to mark "attended" or not. I also included a combobox to search for and and occasional attendees and visitors which are then patched in at the same time.

 

The collection

 

"build collection of committee members who are checked as attended";
ClearCollect(colMembersToAdd,
       ForAll(Filter(Gallery1.AllItems,Checkbox1.Value= true),
                {
                    DisplayName:DisplayName,
                    Claims: Claims
                }
             )
            ) 

 

The patch operation

 

"patch one entry into multi-select person field with a person for each person in collection colMembersToAdd";
Patch(Attendance,Defaults(Attendance),
    { Title:"Meeting Attendees", 
    Attendees:
    ForAll(colMembersToAdd,    
                {   
                    Claims:Claims,
                    Department:"",
                    DisplayName:"",
                    Email:"",
                    JobTitle:"",
                    Picture:""
                }     
            )
    }
) 

 

bdc604
Advocate III
Advocate III

Yep, they’ve been tripping over this column type for years. God help you if you’re dealing with multi-value persongroup columns. Its just a cluster #%...
bdc604
Advocate III
Advocate III

The reason you can’t find tons of examples on google for different scenarios other than the most basic use case is that ppl simply cannot get this column type to work in any advanced scenarios.

Thank you - this works perfectly

fahad
Frequent Visitor

Hi guys, this is really interesting to work on powerapps, I am stuck on a client project where there are two sp lists, requests and processor, there is a combobox attached as office365users of requests list in powerapp, and what I am trying to do is to save combobox person to another list named processor. I appreciate your help on this.
fher
Frequent Visitor

Hi all,

 

sorry to reply to such an old topic, but I wasn't able to find something similiar.

 

Adding a user is working fine with your solutions but how do i add GROUPS to the SharePoint List? I mean.. the column in the list is designed for adding Users or Groups but i cann't get it working..

 

I have a ComboBox with something like "'Office365-Gruppen'.ListOwnedGroups().value.displayName" for choosing a group, but i can't add that into the SharePoint List with a Patch-Statement. Any Suggestions?

This solution worked for me. Thanks

Hi @fher:  I found a fix that appears to be working for O365 groups, as follows:

Instead of this:  

Claims: "i:0#.f|membership|" & "someO365group@yourdomain.com"

 

Try this:

Claims: "someO365group@yourdomain.com"
 
So just remove the front part of that claims attribute.  Now, mind you I have no idea why this worked, but it did. 😉
 

I realise this is an old thread but my issue is very much like what is happening here for some people. With my particular Patch, it was working just fine, until today, when I started getting an error - Specified User could not be found etc.

 

The below image is taken after I made some minor changes being the removal of the reference to TextInput2_36.Text from the Department, Email, JobTitle and Picture fields, and the same for the second part of the patch for Buddy.

 

person patch issue.png

Powerapps FlowChecker is saying:
Patch(source, record, update, update, update, update, ...)

update: The update that needs to be patched to the given record

 

What I am trying to do, is through a gallery, patch a textinput field (as per above) which includes the person field AssignedTo. This is not working, yet when I update the AssignedTo via a form on the app, this works. But the second part of this, is that a flow is triggered, to identify when a job has been assigned based on the DisplayName of the person in the AssignedTo field, and then fill in the AssignedToEmail field. When I fill out the AssignedTo field via the form, my Flow is not able to populate the AssignedToEmail field - this was working previously.......

 

Any help would be much appreciated as I was supposed to be putting this app into full use before weeks end. With this broken, it won't be usable.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,963)