Previously I asked to save the logged in user name to SharePoint List multiuser field, where List Title column value is "A" on the PowerApps form button click. I have sucessfully add and delete my logged in user name to SharePoint multiuser fields on the button click. First of all thank you soo much to v-yutliu-msft. He gave me the solution.
But now I got one more requirment on the multi user fields.
See below screen short. I have created a Gallery control and named as "GalleryMul".
I have Displayed the SharePoint list("CourseInforamtion") data in the "GalleryMul". I have added 2 button control in the Gallery. One is "Vote" and other one is "Unvote". Because its a Gallery control automaticly the other button control are added based on the number of SharePoint List itemes.
My SharePoint list "CourseInformation" have one multiuser people picker column named as "UsersName". So I want when logged user will click on any items, "Vote" button in the Gallery control, then his name should save to SharePoint List "UsersName" column of respective item. For example "RestAPI", "CourseTitle" have ID value is 1. So I want when logged user click on the "Vote" button highlighted one then his name will save to SharePoint list "UserName" column where "ID value is 1".
My approach for "Vote" button is:
ClearCollect(DemoColl1,Filter("CourseInformation",ID=GalleryMul.selected.ID).UserName);
Patch(DemoColl1,Defaults(DemoColl1),{Claims:"i:0#.f|membership|"&Lower(User().Email),DisplayName:User().FullName});Patch(CourseInformation,Filter("CourseInformation",ID=GalleryMul.selected.ID),{UserName:DemoColl1})
I have added the above rule on the "Vote" button "Onselect" but showing error. Give me some Idea please.
Best Regards,
Padmini.
Solved! Go to Solution.
ClearCollect(DemoColl1,Filter("CourseInformation",ID=GalleryMul.selected.ID).UserName);
Patch(DemoColl1,Defaults(DemoColl1),{Claims:"i:0#.f|membership|"&Lower(User().Email),DisplayName:User().FullName});Patch(CourseInformation,Filter("CourseInformation",ID=GalleryMul.selected.ID),{UserNameemoColl1})
I have changed the rule to
ClearCollect(DemoColl1,LookUp('CourseInformation',Title=Gallery3_1.Selected.Title).UserName);
Patch(DemoColl1,Defaults(DemoColl1),{Claims:"i:0#.f|membership|"&Lower(User().Email),DisplayName:User().FullName});Patch('CourseInformation',LookUp('CourseInformation',Title=Gallery3_1.Selected.Title),{UserName:DemoColl1})
It is working fine.
ClearCollect(DemoColl1,Filter("CourseInformation",ID=GalleryMul.selected.ID).UserName);
Patch(DemoColl1,Defaults(DemoColl1),{Claims:"i:0#.f|membership|"&Lower(User().Email),DisplayName:User().FullName});Patch(CourseInformation,Filter("CourseInformation",ID=GalleryMul.selected.ID),{UserNameemoColl1})
I have changed the rule to
ClearCollect(DemoColl1,LookUp('CourseInformation',Title=Gallery3_1.Selected.Title).UserName);
Patch(DemoColl1,Defaults(DemoColl1),{Claims:"i:0#.f|membership|"&Lower(User().Email),DisplayName:User().FullName});Patch('CourseInformation',LookUp('CourseInformation',Title=Gallery3_1.Selected.Title),{UserName:DemoColl1})
It is working fine.
Hi @Anonymous ,
Glad to know that you have solved issue already and thanks for sharing the resolution here so others might benefit in the future.
Regards,
Mona