
I have 2 combo boxes
Group1 and group2
I am getting the values from SharePoint list by using distinct function
those 2 groups datatype in SharePoint list is text fields.
My problem is if we select multiple values in combo boxes then only one value is adding to the another SharePoint list.
I am using patch function to add the values which consists of 10 fields.
please suggest me how to do it.
Thanks in advance
Usha.
hi @UshaJyothi20 ,
try this:
// Assuming you have two combo boxes named Group1 and Group2
// and a SharePoint list named 'YourSharePointList' with text fields 'Group1Values' and 'Group2Values'.
// Convert the selections from Group1 to a comma-separated string
Set(
Group1ValuesString,
Concat(Group1.SelectedItems, Value & ", ")
);
// Convert the selections from Group2 to a comma-separated string
Set(
Group2ValuesString,
Concat(Group2.SelectedItems, Value & ", ")
);
// Patch function to add the values to the SharePoint list
Patch(
YourSharePointList,
Defaults(YourSharePointList),
{
Group1Values: Left(Group1ValuesString, Len(Group1ValuesString) - 2), // Remove the trailing comma and space
Group2Values: Left(Group2ValuesString, Len(Group2ValuesString) - 2), // Remove the trailing comma and space
// Add other fields here as needed
}
);