API Schedule Workflow, updating a List of Images

Hi,

I’m struggling to get some functionality working 100% of the time, it works most of the time but then occasionally things don’t quite go to plan.

I have a typical Listings app where you’re able to upload a bunch of images, they’re assigned to a Listing and you can then view that Listing which shows the images inside a repeating group.

There is a data type called Listing and one called Listing Image

The Listing data type has a field called “List of Images” which contains a List of Listing Images from the Listing Image data type…

I’ve just added a Listing and I’ve uploaded 8 images (the max which I’m allowing right now)
It seems that the workflows have done their thing and it’s created the Listing absolutely fine, I can see this and all it’s details in the Listing view, looks like this…

But notice the column “List of Images” - It shows 6 of them when in fact there should be 8 (because I uploaded 8 using the Multi-File Uploader)

If I go into the database, look at Listing Images, I can see all 8, looks like this…

The workflow which add the images into Listing Image seems to be fine, well I think it does anyway, at least the first step inside it. I think this issue lies with the second step when it attempts to update this List of Images list. Most of the time it works but occasionally it seems to skip a few and I don’t understand why it does this when it happens.

There’s a bit more going on than I’ve explained here, the ability to drag and drop images to re-order also happens, so the first image (based upon the order) is always the one shown as the first item in my Main repeating group on the first screen.

Can anyone help me understand what this problem is?
Thanks very much.
Paul

https://bubble.io/page?type=api&id=swaplot&tab=tabs-2