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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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.

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