I have a sharepoint list that has a multiselect column. in powerapps I would like to make a collection of the selected values.
for example I have a multiselect column named category that have choices One, Two, Three, and Four. I have selected Two and Four.
my code in powerapps Integrated Form OnEdit is
Clear(myCollection);
ForAll(Choices([@SMEList].Category), Collect(myCollection,ThisRecord.Value));
but that is giving me One, Two, Three and Four. I only want the selected Values (Two and Four)
This works:
ClearCollect(colMyCollection,
Filter(
Choices('2022-05-23_StackOverflow'.SMEList),
Or(
ThisRecord.Value = "Choice 2",
ThisRecord.Value = "Choice 4"
)
)
)
Illustrated:
EDIT 1
OnStart
of the app, ClearCollect(colList, <SP_list_name>)
Items
property to colList
. Set its OnSelect
property to Set(varRecord, ThisItem)
Item
property to LookUp(colList, ID = varRecord.ID)
Illustrated
EDIT 2
RE: ...just get it from the sharepoint list .
OnStart
function to ClearCollect(colList, SharepointList)
Items
property to colList
Text
property to Concat(ThisItem.SMEList, Value, ",")
DisplayMode
property of the ComboBox to View
.