Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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


This topic is 6987 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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
Posted

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.

Posted

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.

Posted

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

Posted

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:

This topic is 6987 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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