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:
I have the same question (0)
  • dungar Profile Picture
    134 on 09 Jan 2024 at 01:17:54
    Re: Collect not getting data from all columns?

    Upon more testing this appears to also affect doing things like group by.  In the full application I go from the filter to grouping the columns, and it looks like it's losing the data at that point as well, so something is seriously screwy.

  • 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,

  • dungar Profile Picture
    134 on 09 Jan 2024 at 02:08:59
    Re: Collect not getting data from all columns?

    Thank you.  This appears to solve the issue, although i'm going to have to sprinkle it all over and i'm not really sure why.  It was pulling everything before when I made this, but that was years ago, and as stated I haven't updated in over a year.

  • CU01081230-1 Profile Picture
    29 on 08 Jan 2025 at 13:53:40
    Collect not getting data from all columns?
    I know this has been answered but for anyone else with the problem please not that this appears to be a feature, not a bug. If you enable this then it loads all columns.

     
    But you can see it's retired and will eventually disappear so the requirement is to explicitly set the columns you want.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard
Loading started
Loading started
Loading complete