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?
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.
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,
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.
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2