Patching Combo Box whose items = Office365Users.SearchUser({searchTerm:Self.SearchText,top:999}) which is a multi select to share point list column named 'business sponsor' which of person or group type and is multi select.
please tell me the code for this.
I am also facing one more issue that I am able to patch the combo box items to share point list column and when I click on edit button on the gallery it hovers me to the edit form , but now when I click on submit button , it does patch the already selected values of my people picker combo box, rather it will only patch the values when I reselects the new values in the combo box.
please provide me the correct code for the implementation.
It's the DefaultSelectedItems property.
Best regards,
what property to be set to this code? for the Business Sponsor combo box i have two properties :-
Items: Office365Users.SearchUser({searchTerm:Self.SearchText,top:999})
defaultselecteditems:Parent.Default // as i am using a form
onselect(submit button):Patch(
File,
LookUp(File, Title= Edit_ProjectID_Text_Input.Text),
{
Title:Edit_ProjectID_Text_Input.Text,
'Business Sponsor': ForAll(
Edit_BusinessSponsor_ComboBox.SelectedItems,
{
Claims:ThisRecord.Mail,
Department:"",
DisplayName:ThisRecord.DisplayName,
Email:ThisRecord.Mail,
JobTitle:"",
Picture:""} // Replace with the appropriate property name
)
please tell me where to edit the code , it would be of great help
Hi @upadharp ,
This is because the DefaultSelectedItems of Combo box doesn't match the Items of the Control. You should set it as below:
ForAll(ThisItem.sponsor As SP, LookUp(Office365Users.SearchUser({searchTerm:SP.Email,top:999}), Mail = SP.Email))
Best regards,
ForAll(
Edit_BusinessSponsor_ComboBox.SelectedItems,
{
Claims:ThisRecord.Mail,
Department:"",
DisplayName:ThisRecord.DisplayName,
Email:ThisRecord.Mail,
JobTitle:"",
Picture:""} // Replace with the appropriate property name
)
i have used this to patch, but when i am clicking on edit button in my gallery , it takes me to the edit form screen, now if i do not update the business sponsor combo box that is i keep it as it is without changing any selected values, and click on submit the business sponsor column in the sharepoint list do not get filled with any values and it is empty.
Hi @upadharp ,
You can use blow code for the Person column in Patch function:
ForAll(
ComboBox.SelectedItems As PP,
{
Department: "",
Claims: "i:0#.f|membership|" & PP.Mail,
DisplayName: PP.DisplayName,
Email: PP.Mail,
JobTitle: "",
Picture: ""
}
)
Best regards,
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,081
Most Valuable Professional