web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Apps - Building Power Apps
Answered

Collect not getting data from all columns?

Like (0) ShareShare
ReportReport
Posted on 9 Jan 2024 00:33:04 by 134

This is just mind boggling.

 

I have this query, pulling from a Premium SQL connection-

Filter(
 'MytableName',
 WorkedDate >= DateAdd(
 Now(),
 -50
 ) && Location = varLocation && ValidRecord = true
 )

 

When I plug it into a gallery, it returns all the data.

 

Then I have this query, which is the EXACT SAME, but shoves the results  into a collection on a button press:

Collect(colTest, Filter(
 'MyTableName',
 WorkedDate >= DateAdd(
 Now(),
 -50
 ) && Location = varLocation && ValidRecord = true
 )
)

 

The collection version, for some reason, is missing all the numerical data. It has dates, times, locations, etc, but NONE of numbers i should be pulling.  The columns exist, but are seen as all blank.

 

This is extra wild because this works currently in production.  I'm coming back to an app that's been working for over a year+ to add some extra features, but I can't adjust anything and push it because this issue seems to be killing my ability to change anything.

 

As you can see in the attached images, the gallery on the left shows the date and the total i'm looking for, the gallery on the right is the exact same, but i've changed its Items from the raw query to the colTest variable, and it's missing the data.  The variable when explored in powerapps, shows ALL the data columns missing (there are more columns than what's shown, but the important part is showing that all the bill data is blank).

 

Ignoring that powerapps itself already shows this data, i have triple checked and confirmed that the data 100% exists in SQL.  Can we suddenly not put sql data in a collection or something?

 

 

Categories:
  • Verified answer
    v-jefferni Profile Picture
    on 09 Jan 2024 at 01:48:37
    Re: Collect not getting data from all columns?

    Hi @dungar ,

     

    For SQL databases, we usually use ShowColumns to get all the columns we want from the database:

    ClearCollect(colTT, ShowColumns(SQLDatabase, "Column1", "Column2", "Column3", ...))

     

    Best regards,

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete