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 Apps / Filtering from a Share...
Power Apps
Unanswered

Filtering from a SharePoint list

(0) ShareShare
ReportReport
Posted on by 581

In a combobox I'm getting a row back from a sharepoint list. In the column I want there is an email address. I want to filter it so that it only shows people with a .co.uk email address.

 

How can I do this? as I'm not finding the correct filter.

 

My code is as follows

 

Filter(Choices([@mySharePointList]).requiredColumn), ("co.uk" in ThisItem.requiredColumn.Email)

 

I'm getting no results at all.

 

Thanks in advance 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lee-martin 
    What kind of column is "requiredColumn"?  You are using a Choices function on it, so need to know what type.

  • Lee-Martin Profile Picture
    581 on at

    @RandyHayes thanks for replying

     

    How do I find out in the sharepoint list what the column is? It is just a username with a link to sharepoint contact information

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lee-martin 

    Look at your SharePoint list definition and see how that column is defined.  It sounds like it is a User/Group or a Lookup.  Need to know which one though.

  • Lee-Martin Profile Picture
    581 on at

    @RandyHayes thanks once more

     

    It's Person or Group

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lee-martin 

    Ah, then unfortunately, you will not be able to Filter out by email addresses for the combobox control from the Choices.

    IF you could have, then your formula would have been:

        Filter(Choices([@mySharePointList]).requiredColumn), "co.uk" in Email)

     

    Let me be clear though before I offer any other suggestion...your requirement is to:

    a) Show only users with a "co.uk" ending email address in the combobox dropdown options

    b) Show in a list only records that have users with a "co.uk" ending email.

     

    Which of the above describes your scenario?

  • Lee-Martin Profile Picture
    581 on at

     

    @RandyHayes 

    I believe it's the first one

     

    I'm bringing back a list of usernames, email and pictures. the username is populated in the combobox

     

    I just need to filter out all the co.uk addresses so that only ones ending with that are included

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lee-martin 

    Yes, so unfortunately the built-in ability to do this is not going to be available.  To make it happen, you need to employ the use of the Office 365 Users connector and have your combobox Items be a filter of the users returned from a search.

    The trick then is that an Office 365 User record is different than a SharePoint user record, so it needs to be "translated" when written to your list.

     

    Example for Items property:

    Filter(Office365Users.SearchUserV2({searchTerm:Self.SearchText}).value, EndsWith(Mail, "co.uk"))

     

    Then you will have a list of only users with the co.uk email addresses.  

    HOWEVER, this only deals with the list.  Setting the Default item from your record and writing that back to the list is going to be dependent on how you are using this...is this in your Form, or do you have this in some other way?

  • Lee-Martin Profile Picture
    581 on at

    @RandyHayes  Thank you for this, i'm still new to this app so the functionality is something I'm working out as i go.


    There are two similar columns to this which are related so I'm working on both of them at the same time. I'll try this again in the morning and hopefully this will get me some way to sorting it out.

     

    If it's ok, I may have questions then?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lee-martin 

    Absolutely!  Try it out and if you get stumped, just reply back with the questions.

  • Lee-Martin Profile Picture
    581 on at

    @RandyHayes thank you once more.

     

    The Contacts in the SharePoint List are a snapshot of what's in Office365Users

     

    Is there a way to filter based on the Office365 users and match with what's in the SharePoint List

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard