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 on Datasource (...
Power Apps
Answered

Filter on Datasource (canvas app)

(0) ShareShare
ReportReport
Posted on by 581

I'm trying to filter a datasource from a SQL Server view

I have a data Connection.

I can bring back an unfiltered list perfectly using

ClearCollect(testCollectAll, MySQLServerDataSourceOnView,);

However at no stage do I need an unfiltered list (the number of results is way to large)

 

I am using this Power FX code to filter

- ClearCollect(testCollectOne, Filter(MySQLServerDataSourceOnView, Site_Code = "ABC"));

It returns the correct number of rows filtered correctly, however there is no data in any of the columns other than Site_Code

Also this also changes my already proven to be working unflitered list to only return results from the Site_Code column

 

How can i bring back data in all columns on this filtered list?

 

Thanks
L

 

(i have no choice on the datasource being SQL Server so please do not direct me to use something else as a solution)

(i cannot show any images of the data due to confidentiality rules where I work)

Categories:
  • Pstork1 Profile Picture
    69,661 Most Valuable Professional on at

    If the filter works for you then you don't need to put it in a collection. You can just use the filter portion of your expression in a Gallery. That will show you the first 100 records and continue showing you the rest of the records as you page down through the gallery.  From the Gallery you can select any of the records you want to work on.  Just use this in the Item property of the gallery

    Filter(MySQLServerDataSourceOnView, Site_Code = "ABC")
  • Verified answer
    BCLS776 Profile Picture
    8,994 Moderator on at

    In your case, it sounds like the explicit column selection setting is acting to show only columns the platform thinks will be used. Start by turning this setting off (in the app settings) and see if it resolves the problem.

     

    If explicit column selection is the issue (it is a good feature for performance). Turn it back on and use ShowColumns() around your view name to specify each column you wish to have included in your collection. You will need to name each one.

     

    Hope this helps,

    Bryan

  • Lee-Martin Profile Picture
    581 on at

    Thank you @BCLS776  turning off explicit column selection has worked

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 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard