How to publish latest row of content for different fields?

I’m asking my clients to upload 3 media files. And they can change/modify it whenever they want. So its a form with 3 Image/Video input fields. And I want them to upload as many times as they want but the form will only display the latest set of images/videos.

Every time they update, image1, image2 and image3… it gets updated as a new row in the database. Problem is, how do I display latest set of image1, image2 and image3? Especially when clients update only 1 or 2 images at a time and not the entire row.

Example:
On Day 1, client uploads image1, image 2 and image3. Form should display those 3 media files.
On Day2, client decides to update only image3. Database creates a new row where image1 and image2 are NULL/empty. Image3 has the new image. How can my form display image1 and image2 from Day1 and image3 from Day2?
I’ve tried using sort and filter in dataset element but that filters the entire row. And not for individual media files.

Instead of “updating as a new row”, update the current row without creating a new row.

I’m currently using the Editor’s button and associated options to set it up. The dataset permission mode is set to WRITE only. I guess, that’s why it defaults to creation of new rows. Setting it to READ/WRITE mode solves this problem but creates a whole new problem of not letting user input data for the first time (it only allows to update an existing record).

Hence, would someone know of sample lines of code that can be used alongside existing buttons that I’ve used using the Editor?

Thanks.

any help would be much appeciated