Hello community,
I have a Combo box in a form, users are able to select multiple values.
A string of multiple selected value is created and patch to one SharePoint column.
For example,
in the form, users are able to select fruit items, with choices of [Banana, Apple, Orange]
A string is created and displayed in Button A. Text in Button A: Concat(ComboBox_Fruit.SelectedItems, Value & "; ")
Patch formula - patch back to SharePoint list:
Patch('Fruit Record',Defaults('Fruit Record'),{'Fruit': Button A.Text});
In the SharePoint, the value is being stored such as: Banana; Orange
There is another App for Administrators where they can view those records and select a record to edit. When an administrator select the record and in the edit form, I need to have the combo box to have a default value of selected items, taking the above example, the default values will be "Banana", "Orange".
I have tried using this formula: Split(Gallery_Display.Selected.'fruit',";")
But this formula gives me a result in a table type. I need help in making the split items into an array format so it can be used in the Default formula, ["Banana", Orange"] will be the value for the Default when using the example above.
Any advice is appreciated, thank you.
Solved! Go to Solution.
Try this and since it is in multi select combo box update the formula in DefaultSelectedItems.
RenameColumns(Split(Gallery_Display.Selected.'fruit',";"), "Result", "Value")
Try this and since it is in multi select combo box update the formula in DefaultSelectedItems.
RenameColumns(Split(Gallery_Display.Selected.'fruit',";"), "Result", "Value")
@Jeff_Thorpe It worked! Thank you! Not even sure what the RenameColumns function is but will look it up, thank you again!
Your combo box was expecting a single column table named Value and Splits returns a single column table called Result, so we just needed to change the name.
With the rename function i am able to load multiple selected values for combo box. But when the form is opened and submitted without any changes, the previous selected values of combo box are not getting updated to the list
In my multi-select drop-down, I have the following code in the OnChange property:
ClearCollect(colOptions,Filter(ShowColumns(colOriginalOptions,"field_Column1_x0020_description","id0"),field_Column1_x0020_description in DataCardValueMultiSelectDropDown_1.SelectedItems.field_Column1_x0020_description))
Where the Items property of that multi-select drop-down is:
ShowColumns(colOriginalOptions,"field_Column1_x0020_description","id0")
Then in the Update property for the parent dataCard of that multi-select drop-down I have:
Distinct(Int(ForAll(Sequence(5),Last(FirstN(colOptions,ThisRecord.Value))).id0),id).Result
Note, the above code works for a multi-select drop-down with 5 items. Change that "5" to the total number of items in your multi-select drop-down list.
See if you can adapt something like this to your use case @anushau_1 !
This saved my day, thank you Jeff! 😀
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
57 | |
43 | |
36 | |
34 |
User | Count |
---|---|
270 | |
78 | |
75 | |
74 | |
66 |