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.

Go To Portal Row[Next; Exit After Last] doesn't work

Featured Replies

Anybody out there to help me with this?

I'm trying to loop through a portal copying a field to a different database (not related).

My problem is that Filemaker never makes it to the next row. It keeps copying and pasting the first row.

This is the script:

***********************************

Go to Portal Row[First]

Loop

Copy[select; pr::field]

# paste contents via sub-script in external db:

Perform Script[sub-Scripts;External: "db.fp5"]

Go To Portal Row[Next; Exit After Last]

End Loop

***********************************

It seems the loop doesn't work because of the Copy command.

Any thoughts on this anyone?

Edited by Guest

You might have better luck if you went to the related table with a Go to Related Record show only related and then loop through the found records.

Else use a global to store the portal row and increment that number and the use it to go to portal row.

  • Author

Thanx!

Used the global field option, because it seems faster.

How many records are being set in the external file with each call of the sub-script? If it is only one and you have a relationship from the main file to it, then you may not need the sub-script at all; you could simply use a loop with Set Field [relationship::field, pr::field], if that is the only step being performed.

  • Author

Unfortunately i cannot use the Set Field command because i am trying to fill a temp database with specific fields of my portal. All this because i want to export a set of records instead of a single field of a single record to get rid of those annoying "char(11)" line breaks.

So my script now does the following and it works:

- loop through the portal with the "go to by value" command as suggested by RalphL.

- fill a new record in a temp db with a specific field for each record in my portal.

- export the temp db as a whole

- delete all records in the temp db.

thanks everyone for your thoughts on this

You can still use Set Field (which is also preferable to Copy/Paste), but now I am curious why you don't just go to the related records and export the single field. :qwery:

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.