cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
akharns
Post Patron
Post Patron

All columns not loading

I have a SQL view that returns the latest months.  It returns two columns, a key value and a display value.  I am loading this view into a collection from the application's OnStart .  For some reason, the display column is loading blank.  Powerapps sees both columns but there is no data in the display column.  When I run the view on SQL, data appears in both columns.  

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

@akharns 

Just to clarify, do the Disp_YearMo values appear correctly when you use this syntax to populate clYearMo?

ClearCollect(clYearMo, 
             ShowColumns(vw274_YearMo_Selection,"Disp_YearMo","YEARMO")
);

 

View solution in original post

8 REPLIES 8
olsen9
Resolver II
Resolver II

what do you have in your item for the display field?  Should be thisitem.(fieldname) or something similar

timl
Super User
Super User

@akharns 

The most likely cause of this problem is the 'explicit column selection' setting.

If you explicity specify the columns you want to collect by calling ShowColumns, that should hopefully solve the problem.

ClearCollect(col,
             ShowColumns(YourSQLView, "KeyColumn", "DisplayColumn")
)

The view only returns two columns.  I want them both.  The Dropdown can see them both, but the display column is empty.

 

ClearCollect(clYearMo, vw274_YearMo_Selection);

akharns_0-1652216672895.png

akharns_1-1652216841049.png

 

 

Yes.  See the screen prints etc under my reply to timl.

timl
Super User
Super User

@akharns 

Just to clarify, do the Disp_YearMo values appear correctly when you use this syntax to populate clYearMo?

ClearCollect(clYearMo, 
             ShowColumns(vw274_YearMo_Selection,"Disp_YearMo","YEARMO")
);

 

Hmm.  That does work.  It raises questions in my mind about how PowerApps chooses to edit my column list.  This may answer a separate question that I have an open discussion on.  Where can I read about this?

timl
Super User
Super User

Hi @akharns 

Here's a post with some details on explicit column selection.

http://powerappsguide.com/blog/post/how-does-the-explicit-column-selection-setting-work

 

akharns
Post Patron
Post Patron

Thanks, @timl.  That's the explanation I needed.

 

If you need only a few columns, explicit columns is the obvious answer.  If you need a large number of columns, I can see that you might start your search with limited columns, and then use a different query to pull the full set of fields, with a more targeted filter.  If I have a form with all the detail rows I need and I use a lookup for that form, returning just the one row, I wonder if PowerApps will correctly identify the columns I need.  Some columns may be in formulas.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (4,279)