ejpvi Posted November 11, 2009 Posted November 11, 2009 Ok, I could use some suggestions for this. I have a very large repository of information spread out across 3 tables in SQL. In FMP, I have created 3 table occurrences of these sql tables and have defined relationships between the common variables. I am attempting to mirror that database here in Filemaker. on a Daily basis it uses a previous order date to show all of the new orders... I use a portal to display all of the information from the 3 tables that I need on the screen for that day. I wrote a script that will loop through this portal and copy the data to my filemaker table. I set all of the values into local variables... I then switch to my FMP layout and paste it in... Here is where the problem starts... I have it move back to the original layout... instead of going to the next portal record as instructed... it starts over at the beginning... thus causing an infinite loop. I don't really think I can get around switching layouts... because I need to create a new record in a different table to paste into. Anyone know a way around this? Is there a way to return to the last portal record I was just in? I do realize the dangerous nature of using Portals like this... but I don't see any other way to filter the data down. the portal displays exactly what I need.
Vaughan Posted November 12, 2009 Posted November 12, 2009 Try using the Go to Related Records (aka GTRR) script step. This will change to the related table and select the related records in one step. Then loop through the records in the found set. When done, return to the original layout. If you want to persist with your current method you need to remember the current portal row before leaving the layout, because (as you've found) you always return to the first portal row. You need to change your script so you return to the layout and then select the portal row you just left.
ejpvi Posted November 13, 2009 Author Posted November 13, 2009 That did the trick... I had used that before... but didn't realize it worked the same way in this situation.... Thanks!
Recommended Posts
This topic is 5489 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 accountSign in
Already have an account? Sign in here.
Sign In Now