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.
Solved! Go to Solution.
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
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:'
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
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.
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.
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
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!
User | Count |
---|---|
258 | |
111 | |
95 | |
48 | |
41 |