Auto re-open only a number of times

Let’s say you want the user to add only 3 images. But you also want to speed it up using auto re-open in your form view.
Out of the box auto re-open will continue, until the user hits cancel in the form view.

Here is a workaround.
I have a Customer table and an Image table.

  1. Enable Auto re-open in your form view.
  2. In Event Actions Form Saved set a navigation Action (App: go to another view within this app)
    In my case I used the system generated action View Ref (Customer)
  3. Give this action a condition like COUNT([Customer].[Related Images])>2

14 Likes

Nice! So the form-save action breaks the ‘Auto re-open’ loop. Great tip, @Fabian ! Thanks for sharing.

I wonder if that’s the case with all action types, or only navigation ones!? What if you want an action to run after every form and NOT break the loop?

3 Likes

That’s a very cool trick, thanks for sharing @Fabian !

2 Likes

This is possible. You can use a Data Change Action. The loop would not break.
You can even use a grouped action as the form saved event.
Here I use a grouped action that

  1. sets the image number with an Action Data: set the values of some columns in this row:
    COUNT([Customer].[Related Images])
  2. breaks the loop after 3 images are added

3 Likes

Nice one!

I typically use navigation actions to handle repeating forms;

- but yours has the added advantage of the form animation.

:+1:

2 Likes

And: Advance forms automatically is only working with auto re-open, not with navigation actions!

2 Likes

Advance forms automatically is now also working with navigation actions.

1 Like