cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SnowGroomer
New Member

Duplicate records in collections after Patch, Refresh, Clearcollect - SQL

Hi Guys,

 

I have an issue. I have a collection of items, downloaded from an SQL view. I'm patching one of these items in SQL table directly and then I do what I understand to be a full refresh cycle:

1. Refresh SQL data source

2. Clearcollect the collection used as a data source for my gallery.

 

The result is that I do see the updated record, but it appears twice... I even tried clearing the collection, multiple refreshes and clearcollects, delayed refreshes using timer - nothing seems to work.

 

I checked the SQL - no duplicates, I clearcollected data filtered by this item ID to a new collection, only one item is shown.

 

Only when I quit the app and re-open it, the duplicate value disappears.

 

What could be the issue? I would appreciate any suggestions. I'm stuck here...

Thanks and regards.

1 ACCEPTED SOLUTION

Accepted Solutions

Hey @RandyHayes ,

Thanks for the response. It actually helped. I was able to replicate the issue in an empty screen, so it got me thinking on my connections and I have found the culprit and a workaround.

 

At first I was working with SQL views (most convenient way to join tables for me). The views always create this issue for me, but if I join what I want using AddColumns to a collection, the problem disappears.

 

I would love to have it working using views, but I don't really have time to dwell on this now. If someone has found similar issues (and a solution) when working with SQL views in PowerApps, please chip in! 🙂

 

Best regards,

SG

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@SnowGroomer 

In general, from your description, this all sound like it should be working.  So, there must be some factor that is at play here and you need to hunt it down.

 

I would perform a simple test on a different screen without any other factors (no variables at play, no extra actions, etc.) and see if you can duplicate the problem on a totally "fresh" setup.

 

Check that out and if no joy, post back again and provide some of your formulas you're using.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hey @RandyHayes ,

Thanks for the response. It actually helped. I was able to replicate the issue in an empty screen, so it got me thinking on my connections and I have found the culprit and a workaround.

 

At first I was working with SQL views (most convenient way to join tables for me). The views always create this issue for me, but if I join what I want using AddColumns to a collection, the problem disappears.

 

I would love to have it working using views, but I don't really have time to dwell on this now. If someone has found similar issues (and a solution) when working with SQL views in PowerApps, please chip in! 🙂

 

Best regards,

SG

View solution in original post

Anonymous
Not applicable

I am able to confirm I am experiencing the same issue with SQL view. Will try the AddColumns now. Thank you for sharing. 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (61,250)