Image collection number not resetting back to one on new created item

Hello,

why does the image number not revert back to one when uploading another item. this is a problem when trying to display the images in my image carosel for each item because they need to start at one to match the input field.

see image below

Hello, please can you share an image of the action that updates the “Motorbike Image Number” property?

Thank you!

You need to tell Adalo how you want to count that…

There is many ways to archieve what you want but the solution depends of your database setup and your screen design.

Here one possibility:

When you create a new Motorbike:
CREATE MOTORBIKE
Motorbike = gfnfgngf
etc

When you add images to Motorbike images:

CREATE MOTORBIKE IMAGES
Motorbike = gfnfgngf
Motorbike Image Number = FORMULA(INPUT_HIDDEN+1)

INPUT_HIDDEN Setup:
Default Value = COUNT All Motorbike Images WHERE Motorbike = gfnfgngf

To create an input “Hidden”, just set the width and lenght small and place the control under another one bigger.

obviously its set up to add one to count but no way to start from zero?

You can add Filters to the Count.

Thanks all. i worked it out by having another hidden text input as current image count and then running the original formula form the input +1