Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Script step "Loop [exist after last]" doesn't exit

Featured Replies

Hello everyone.

For my first post here's something I've just encountered.

When in a portal you have a text field with option "auto enter calculated value", a script including script steps "Loop, Go to portal row, specify next, [exit after last]" does NOT actually exit. It will just get you the spinning wheel and a corrupted related file.

The reason is, the script never meets a very last ported record, because each time it selects the last row, a new record is created by the auto-entering of the calculated value.

It seems this doesn't occur with the serial entries.

Tip: starting by the last but one row with "Specify previous" works fine.

I would think you'd only need a relationship that doesn't have 'Allow creation of related records' selected for this to work fine. Am I wrong in the assumption? I know I've done something like this before, but it was ages ago.

  • Author

Right.

In my solution, the same relationship works for other scripts where creation of related records is needed.

For many reasons, it is not always a good idea to work with too many relationships, resulting in a lot of portals on a lot of layouts (remember "Go to portal row" refers only to one portal per layout).

The BAD trick (according to me) remains that the creation of related records is a relationship feature, and the deletion of such records a portal feature...

I would just duplicate the relationship and deselect the ability to 'Allow creation of related records'. Use a portal with this relationship for your script. (An even better idea would be to run the loop completely in the related file, thus bypassing the need for a script involving a portal.) You can use as many portals on one layout as necessary. Specify Go to Field [relation::field] before your Go to portal row step. If you have more than one portal (for whatever reason) with the same relationship, experiment with Go to Field to determine into which portal it puts the cursor. I believe this would be in reverse order to the depth of each portal, i.e. a portal sent to the very back will be entered before a portal that is arranged closer to the front.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.