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 / Filter column value in...
Power Apps
Answered

Filter column value in combobox based on two sharepoint list

(0) ShareShare
ReportReport
Posted on by 4

I have two sharepoint lists 

      1 : VTS_LiveSites (Fields)

               ID

               Site Name

               Start Date

               End Date

      2 : VTS_UserRolesList (Fields)

              SiteID

              SiteName

              UserName

              UserRole

Currently I am filtering each user sites in combobox from list "VTS_UserRolesList", but I dont want to show that site after its End Date from list VTS_LiveSites

 

Currently User formula : Filter(VTS_UserRolesList, (UserRole = "Security" && UserName.DisplayName = CurrentSignedInUserName))

Ubaid2001_0-1659560492630.png

Ubaid2001_1-1659560545922.png

 

 

 

Categories:
  • Verified answer
    rb Profile Picture
    835 Super User 2024 Season 1 on at

    Note: In my examples I use Title instead of SiteID

     

    Something like this could work, but you will run in to delegation issues if you have more than 2000 LiveSites:

     

    Filter(
     VTS_UserRolesList, 
     UserRole = "Security" 
     && UserName = "PowerAppsUser"
     && Title in Filter(VTS_LiveSites, 'End Date' >= Today()).Title
    )

     

     

     

    Alternatively, this will work until your users have been active in more than 2000 sites:

     

    With(
     {MySites: Filter(VTS_UserRolesList, UserRole = "Security" && UserName = "PowerAppsUser")},
     Filter(
     MySites As MS,
     LookUp(VTS_LiveSites As LS, MS.Title = LS.Title).'End Date' >= Today()
     )
    )

     

     

     

    You could even cache the Active sites in a collection:

     

    ClearCollect(colActiveSites, Filter(VTS_LiveSites, 'End Date' >= Today()))

     

    Then use it in your Combobox:

     

    With(
     {MySites: Filter(VTS_UserRolesList, UserRole = "Security" && UserName = "PowerAppsUser")},
     Filter(
     MySites As MS,
     MS.Title in colActiveSites.Title
     )
    )

     

     

     

    metsshan_1-1659578389283.png

    metsshan_0-1659578168604.png

    I might be wrong, but I don't think you can fully delegate this kind of query with SharePoint. I hope one of the above is suitable in your use case, though

  • Ubaid2001 Profile Picture
    4 on at

    Thanks, It is working perfectly

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard