cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sjcitpro
Helper III
Helper III

Sharepoint list People or Group column not updating from Form ComboBox

I have a Sharepoint list with a Person or Group Column named QCM.

 

I populate a Forms Combo Box (CF_QCM_Data) with: Filter(Office365Users.SearchUser({searchTerm:"", top:500}),JobTitle = "Quality Control Manager" && Department = CF_Project_Data.Selected.Title).DisplayName

 

The Card (CF_QCM) Update is: CF_QCM_Data.Selected

 

When the Form is submitted the Sharepoint List QCM column is not updated.

 

No errors on App.

 

I created a Button, ClearCollect(varTemp, CF_QCM_Data.Selected), and can see the Office365Users info of Selected person in CF_QCM_Data box.

1 ACCEPTED SOLUTION

Accepted Solutions

yes, but I created another thread looking for an answer: "Email data not populated from ComboBox selected"

View solution in original post

8 REPLIES 8
sjcitpro
Helper III
Helper III

Here is how I got it too work:

 

In the Submit form action:

UpdateContext({varQCMUser:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i:0#.f|membership|" & Lower(CF_QCM_Data.Selected.Mail),
DisplayName:CF_QCM_Data.Selected.DisplayName
}
});SubmitForm(ConcreteForm); Navigate(HomeScreen,ScreenTransition.None)

 

The Update value for card CF_QCM is varQCMUser

v-xida-msft
Community Support
Community Support

Hi @sjcitpro,

Have you solved your problem?

Could you get the Mail property (CF_QCM_Data.Selected.Mail) based on the formula within the Items property of your Combo Box control (CF_QCM_Data)?

Based on the formula that you provided, I think there is something wrong with it. In addition, I think it is not necessary to initialize a context variable to achieve your needs.

I have made a test on my side, please take a try with the following workaround:'1.JPG

 

2.JPG

Set the Items property of the Combo Box control (on your side, it is CF_QCM_Data) to following:

Office365Users.SearchUser()

On your side, you should type:

Filter(
Office365Users.SearchUser({searchTerm:"", top:500}),
JobTitle = "Quality Control Manager" && Department = CF_Project_Data.Selected.Title
)

Set the Update property of the Data card (On your side, it is CF_QCM) which contains the Combo Box control to following:

{
   '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
    Claims: "i:0#.f|membership|" & Lower(DataCardValue8.Selected.Mail),
    DisplayName: DataCardValue8.Selected.DisplayName
}

On your side, you should type:

{
   '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
   Claims: "i:0#.f|membership|" & Lower(CF_QCM_Data.Selected.Mail),
   DisplayName: CF_QCM_Data.Selected.DisplayName
}

Please also check and see if the following blog would help in your scenario:

https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

If you have solved this issue, please consider click "Accept as Solution" to identity this thread has been solved.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I got it working but then found another issue whereas there is no selected value in the ComboBox CF_QCM_Data until something is picked in the ComboBox. 

 

The Form default for CF_QCM_Data is Parent.Default and the correct value shows when opening the Form from a Gallery on another screen, but the initial selected value is NULL until an item it picked.  So I had to pass the QCM data as a variable (varQCMUser) to the Form in the case the ComboBox was not changed and the Form was submitted, then use that variable (varQCMUser) as the Update for the Form. 

 

I update the varQCMUser variable with an CF_QCM_Data OnChange action.

 

So, I don't know how to make the Forms ComboBox "shown item" equal to a default value.  

 

It works for now, not as clean as I think it should be.

I actually figured this out. I set Default to nothing and DefaultSelectedItems to Parent.Default, the I could get rid of passing the variable. This allowed me to use the @odata statement in the card's Update.

Arggg.  When I initially enter the form the CF_QCM_Data.Selected.Mail is blank, CF_QCM_Data.Selected.DisplayName has proper value.  When I choose a new person from ComboBox then CF_QCM_Data.Selected.Mail populates.  I swear this was working earlier, now I cannot figure out why the MAIL is empty.

Anonymous
Not applicable

Hi @sjcitpro thank you for your post and for updating the thread with your solutions so far. Do you still need assistance with your last post?

 

@Anonymous

yes, but I created another thread looking for an answer: "Email data not populated from ComboBox selected"

Would it be possible to have the mentioned code explained on how it works?  I know this is an old thread but I just tried and blindly and now my combo box is working.  Just wanted to know the mechanics.  Thanks!

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,182)