web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Using the IN operator
Power Pages
Answered

Using the IN operator

(0) ShareShare
ReportReport
Posted on by 90
This should be easy:
1. I have a combobox where users can select several states.
2. From this combobox I use this code:
Set(SelEmailStates,Concat(ComboBox1.SelectedItem,'StateAbbreviation' & ","));
3. That instruction generates a string: "AK,AZ"
4. I want to use this to filter a SP list:
Filter(zWPB_State_Contacts,state in varSelEmailStates)
 
The "in" is underlined and I get a delegation warning but it's also not finding any records. 
 
Any insight would be appreciated.
 
Carter
 
 
Categories:
I have the same question (0)
  • Verified answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at
    Checkout following way:
     
    ClearCollect(SelEmailStatesCollection, ComboBox1.SelectedItems)
     
    Filter(zWPB_State_Contacts, StateAbbreviation in SelEmailStatesCollection)
     
    Filter(zWPB_State_Contacts, 
      ForAll(SelEmailStatesCollection, StateAbbreviation = SelEmailStatesCollection[@StateAbbreviation])
    )
     
  • disappointed Profile Picture
    90 on at

    Thank you, SaiRT14.

    You put me on the right track for something that worked. Putting the items to be matched in a collection was spot on. A little tweeking on the search also worked. 

    Carter

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 26 Super User 2026 Season 1

#2
Lucas001 Profile Picture

Lucas001 19 Super User 2026 Season 1

#3
CN-06091549-0 Profile Picture

CN-06091549-0 18

Last 30 days Overall leaderboard