cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mccardj
Helper IV
Helper IV

Collect in Gallery Adding Duplicates Error

Hi all,

 

I can't understand why when I add an item to a collection in a gallery, it's adding duplicates - always 3! I'm using a simple "On select" function to a button with variations of the below formula to see if it was the formula, but it's always adding 3 instead of the 1!

Collect('Attendance Collection', {Id: ThisItem.Id, Value: Self.Text})
Collect('Attendance Collection', ThisItem)

 

 

Before:

Screenshot.png

 

After:

Screenshot (1).png

 

It should just be 1!

 

Any help would be amazing!

1 ACCEPTED SOLUTION

Accepted Solutions
SudeepGhatakNZ
Solution Sage
Solution Sage

Are you sure you do not have multiple instances on Collect() in your app?

The right thing is to identify the root cause of the issue, but alternately, you can use Distinct() to ignore duplicates.

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.

View solution in original post

2 REPLIES 2
SudeepGhatakNZ
Solution Sage
Solution Sage

Are you sure you do not have multiple instances on Collect() in your app?

The right thing is to identify the root cause of the issue, but alternately, you can use Distinct() to ignore duplicates.

If my suggestion helped you, please give it a Thumbs up and mark it as a Solution so that it can benefit others in the community.
mccardj
Helper IV
Helper IV

Thanks! I did! I removed the other instance and it worked - thanks 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,652)