October 8, 200520 yr 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 October 8, 200520 yr by Guest
October 9, 200520 yr 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.
October 11, 200520 yr 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.
October 11, 200520 yr 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
October 11, 200520 yr 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