Hi Powerapps experts,
my task is to create a dynamic form, based in form element data in a SharePoint list (named 'Formulare-Kommunikationsportfolio'). This works like a charm. I collect the elements and map it in a gallery on the respective form items.
Now, I struggle with filtering the items for the dynamic form. I only want to collect items from 'Formulare-Kommunikationsportfolio' in the collection "dynamicForm", where the value of the field entry in column "Kanal" in the collection "selectedWerbemittel" (which is a text field) matches one of the values in the field from column "Kanal" of 'Formulare-Kommunikationsportfolio' (which is a multiselect field). So basically to filter if a string (from selectedWerbemittel) in contained in an array (from 'Formulare-Kommunikationsportfolio').
This is my approach so far but I dont't know how to do the filter logic (syntax with ; and ;; is correct for my language version DE).
Thank you in advance for a little help dear experts!
ClearCollect(
dynamicForm;
Filter(
'Formulare-Kommunikationsportfolio';
!IsEmpty(
Filter(
selectedWerbemittel;
// match fields
)
)
)
);;
Thank you @v-mengmli-msft . I ended up doing like this
ForAll(
Distinct(selectedWerbemittel; Kanal);
If(
CountRows(Filter(selectedWerbemittel; Kanal = Value)) > 0;
Collect(
dynamicFormPrep;
Filter('Formulare-Kommunikationsportfolio'; Value in Kanal.Value)
)
)
);;
ClearCollect(dynamicForm; ForAll(Distinct(dynamicFormPrep; ThisRecord); Value));;
Hi @ChrisBer ,
Here is a method for your reference:
ClearCollect(dynamicForm;ForAll(Distinct(Ungroup(ForAll(selectedWerbemittel As C;Filter('Formulare-Kommunikationsportfolio';C.Kanal in Concat(Kanal,Value));"Value");ID) As B;LookUp('Formulare-Kommunikationsportfolio';ID=B.Value))
Best regards,
Rimmon
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2