Repeater shows duplicates

Hi all,
A quick thanks to all at Wix and GivemeWhisky who have helped so far.
Problem 1.
My repeater is duplicating fields on each item. I have 3 items in the repeater on the page and have deleted all except 3 rows in the collection to see if the repeater is the issue. Strangely, 1 item does show information from a different row in the database.
Problem 2
Ideally, i would like to dynamically add a new item to the repeater, once a row in my collection has been completed because as with problem 1, all the items would be duplicated
Your guidance would be much appreciated
Thanks
Adam

Post your code and add a screenshot of the collection.


This is the repeater in the editor


This is the repeater in preview

interestingly in the first repeater, where the text element called EVENT is linked, this is picking up different data from different rows which is good, that’s what i’m trying to achieve for the other elements.

In the collection, Howard Smith has been added by user with different names so these different names should be shown as such on item 2 and 3 respectively

I haven’t added any code at all because i don’t know what to add at this point

Thanks JD
Regards
Adam


Howard Smith was the last updated row and in the repeater has used this field to populate every NAME the same

Page code

Hi J.D. did you get a chance to take a look at my uploads ?

thanks
Adam

If I got it right, the repeater is connected to dataset2 via the editor and no code involves in this connection, so I can’t help with that.

You are partially right. The repeater is connected to one of the datasets. There are two datasets. One for a photo and the other for all of the text based events in the collection.
I haven‘t added any code because I didn’t think I needed to and I wouldn’t know what to add at the moment to make each repeater item, read from a row in the collection datasets assigned.
the telephone team recommended I ask for code assistance hence this issue so not sure how to move forward ?

I’m pretty sure dataset 1 is the primary dataset

Ok an update; Massive stroke of luck, i’ve googled just about every term i can think of for some help on this.

The code i used to get the names from each row of the collection was

export async function dataset1_itemValuesChanged() {
await $w(‘#dataset1’).refresh();

Now i’d just like to get my photos to display from their unique rows also. I have created a reference field from dataset 2 (this one has the photos that were uploaded) with dataset1 (the primary dataset used to connect to the repeater)

Any clues would be much appreciated.

I used this link which may help some https://www.slideshare.net/yoavaa/wix-code-todo-app-yale-hachathon

Thanks
Adam


This is the next problem :slight_smile:
Thanks Guys

@jonatandor35 Hi, i’ve made some progress with the names but not the images. Could you take a look please