I have a table in Dataverse called "Document Masters' with 8 records. I have an Alternate key set so that I do not get duplicates on Document Number.
In a Canvas App I have been using a collection - colGridData. I have a button with:
ClearCollect(colGridData, 'Document Masters');
Set(varX, CountRows(colGridData));
I link this to a Gallery. When i run this, the gallery fills with close to 100 records. varX =8.
I then ran the same code on a different collection name (colTest). This time it works as expected, 8 rows in the Gallery and varX=8.
It seems like colGridData is picking up old records from somewhere. I checked in the Monitor app, and it shows many Sort operations running when i use colGridData, but not when i use colTest.
Is there some way to re-initialize a collection ?
Regards
Dave
Issue was resolved. Looks like i had a problem with my Data source. I deleted the 'Document Masters' data source, then re-added it, and like magic everything works as expected now. I recently moved this solution from my Default environment into a Dev environment, so this is probably reason why i had issues ...
Regards
Dave
mmbr1606
22
Super User 2025 Season 1
stampcoin
19
Michael E. Gernaey
15
Super User 2025 Season 1