I have a SharePoint List recording some contacts or investigators and I would like to filter them out based on a multi-select column called "Specialties". I have used the code as below to filter but it can only filter based on the order in the list. Could you please figure out any other way to filter so that the order in the combobox selection can no longer be a concern?
SortByColumns(
Filter(
AddColumns(
'Vendors and Contacts list',
"Spec2",
Specialties
),
Country.Value = drp_CountriesChoice.Selected.Value,
StartsWith(
'Contact Name',
txtin_ContactCompanyFill.Text
) || StartsWith(
'Company Name',
txtin_ContactCompanyFill.Text
),
Concat(ComboBox1.SelectedItems, Value, ", ") in Concat(Spec2, Value, ", ")
),
"Title"
)
Solved! Go to Solution.
Hi @karolyuan ,
I assume that the gallery only shows the records equal to choice1 and choice2 when the ComBobox selects choice1 and choice2. I have test on my side, please try the following workaround.
SortByColumns(
Filter(
'Vendors and Contacts list',
Sum(
ForAll(
ComboBox1.SelectedItems,
If(
!(Value in Specialties.Value),
{TheValue: 1},
{TheValue: 0}
)
),
TheValue
) < 1
),
"Title"
)
Please try to modify your formula like this.
SortByColumns(
Filter(
'Vendors and Contacts list',
Country.Value = drp_CountriesChoice.Selected.Value,
StartsWith(
'Contact Name',
txtin_ContactCompanyFill.Text
) || StartsWith(
'Company Name',
txtin_ContactCompanyFill.Text
),
Sum(
ForAll(
ComboBox1.SelectedItems,
If(
!(Value in Specialties.Value),
{TheValue: 1},
{TheValue: 0}
)
),
TheValue
) < 1
),
"Title"
)
Best Regards,
Zhi Chen
Hi @karolyuan ,
I assume that the gallery only shows the records equal to choice1 and choice2 when the ComBobox selects choice1 and choice2. I have test on my side, please try the following workaround.
SortByColumns(
Filter(
'Vendors and Contacts list',
Sum(
ForAll(
ComboBox1.SelectedItems,
If(
!(Value in Specialties.Value),
{TheValue: 1},
{TheValue: 0}
)
),
TheValue
) < 1
),
"Title"
)
Please try to modify your formula like this.
SortByColumns(
Filter(
'Vendors and Contacts list',
Country.Value = drp_CountriesChoice.Selected.Value,
StartsWith(
'Contact Name',
txtin_ContactCompanyFill.Text
) || StartsWith(
'Company Name',
txtin_ContactCompanyFill.Text
),
Sum(
ForAll(
ComboBox1.SelectedItems,
If(
!(Value in Specialties.Value),
{TheValue: 1},
{TheValue: 0}
)
),
TheValue
) < 1
),
"Title"
)
Best Regards,
Zhi Chen
Thank you so much! This is really a life saver. I can finally apply filter as I want
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 |
---|---|
185 | |
53 | |
41 | |
37 | |
31 |
User | Count |
---|---|
246 | |
75 | |
71 | |
69 | |
65 |