Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

SQL Datasource, column data is not showing when "Disable explicit column selection" is off

(1) ShareShare
ReportReport
Posted on by 2
I have an issue with an existing app when "Disable explicit column selection" is off
 
I'm using a gallery that is based off a view in SQL.
And upon clicking a button in the gallery, it runs the function:  ClearCollect(SelectedActionLog,ThisItem);
However, the collection have columns where data is empty when "Disable explicit column selection" is off.
 
I see that this ""Disable explicit column selection" setting is retired. What does this mean for my app? and what is the work around?
Categories:
  • Suggested answer
    timl Profile Picture
    34,955 Super User 2025 Season 1 on at
    SQL Datasource, column data is not showing when "Disable explicit column selection" is off
    Explicit column selection is a performance feature . 
     
    With explicit column selection enabled, Power Apps will retrieve only the data that corresponds to columns that are actually shown in your gallery. 
     
    This is the reason why your call to ClearCollect, includes empty columns. 
     
    To resolve this, you can look up the record rather than reference ThisItem
     
    ClearCollect(SelectedActionLog,
                 LookUp(YourSQLView, PrimaryKeyCol=ThisItem.YourPrimaryKeyCol)
    );
     

    Alternatively, you can modify the Items property of your gallery and replace the reference to your SQL view to with a call to ShowColumns that explicitly specifies the columns that you want to retrieve.
     
    ShowColumns(YourSQLView, Column1, Column2, Column3, etc) 
     
     
     
     
     
     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    41,324 Super User 2025 Season 1 on at
    SQL Datasource, column data is not showing when "Disable explicit column selection" is off
    Hi
     
    What permissions do they users have, as they go through the gateway?
     
    You may need to run those queries as either a) each user has the proper permissions or b) as a service account, where the users STILL need a license, but that you can simply have a Service Account do the queries so you only need to give them the required privs, which they do not have since that is off.
     
    That's what I would do

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,695 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard