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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter datasource in C...
Power Apps
Unanswered

Filter datasource in ComboBox

(0) ShareShare
ReportReport
Posted on by 110
Hi! I am building a custom form by Power Apps integrated with a SharePoint list to allow colleagues to update inventory items. The form includes a combo box connected to a staff contact list (excel) for selecting the responsible personnel. This contact list is updated manually.
 
Name Email Staff Code Contact No. 
Larry Lam larry.lam@abc.com MCCL 12345678
Charlie Chan charlie.chan@abc.com WTW 23456789
 
 
Name Email Staff Code Contact No. 
Larry Lam larry.lam@abc.com MCCL 12345678
Charlie Chan charlie.chan@abc.com WTW 23456789
Mary Smith mary.smith@abc.com 0 34221234
 
My goal is to ensure the combo box only displays staff members with a valid staff code (more than one English letter, i.e Larry Lam and Charlie Chan).  I'm using the following formula in the combo box's Items property, but it's currently returning nothing:
AddColumns(Contact,NewPrimaryEndUser,Len('Staff Code') > 1)
I'd appreciate any guidance on how to modify this formula so that only staff names matching the criteria are displayed.
 
Thanks for your help!
Categories:
I have the same question (0)
  • Shravyashree_Shetty Profile Picture
    49 on at
    Filter datasource in ComboBox
    Hi, 
    Please try the below 
     
    Filter(
    MyCollection,
    IsMatch('Staff Code', "^[A-Za-z]+$")
    )



    PLEASE GIVE THIS ANSWER A THUMBS UP, IF THIS HELPS AND ACCEPT THIS ANSWER AS A SOLUTION FOR FUTURE REFERENCE!
  • Ceres2186489 Profile Picture
    110 on at
    Filter datasource in ComboBox
    I updated the apps with your formula. But combo box showed item1, item2 ...
     
     
    Is there anything I need to set?
  • Ceres2186489 Profile Picture
    110 on at
    Filter datasource in ComboBox
    I'm also running into a small snag with the custom inventory form.  It's designed for colleagues to update inventory items, requiring an inventory number. I'm using the LOOKUP() function to pull asset details in my Excel database, but the app keeps flagging an error when the lookup value is blank (before an inventory number is entered).
     
     
     
    Do you have any suggestions on how to handle this?
  • Shravyashree_Shetty Profile Picture
    49 on at
    Filter datasource in ComboBox
    I hope you have Replaced the collection name from MyCollection to Contact (the Datasource of your list)
    Also Check the Title in the right side set the fields property to Staff code
    PLEASE GIVE THIS ANSWER A THUMBS UP, IF THIS HELPS AND ACCEPT THIS ANSWER AS A SOLUTION FOR FUTURE REFERENCE!
     
    Likes on the replies are appreciated
  • Shravyashree_Shetty Profile Picture
    49 on at
    Filter datasource in ComboBox
    Hi
    For the Inventory Part, 
    Could you please specify what the usecase is ? Is it the number of characters in the 'Inventory number' ?
     
    Also, you can use !Isblank()  instead of Not(Isblank())
  • Rajkumar_M Profile Picture
    3,741 Super User 2025 Season 2 on at
    Filter datasource in ComboBox
    Hi,
     
    To filter the ComboBox to display only staff members with a valid staff code (more than one English letter), you need to adjust your formula to properly filter the data based on the length of the 'Staff Code'. The AddColumns function is used to add a calculated column to a table, but in this case, you want to filter the existing data. You should use the Filter function instead. 
     
    Filter(Contact, Len('Staff Code') > 1)
     
    Thanks!
     
    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard