Bonnerbl Posted November 9, 2010 Posted November 9, 2010 (edited) Item table has a historical values table. There can be multiple historical values per item. The relationships is defined that historical values can be deleted/created/etc from the item. I have a script to update the historical values with current info from the item table. What is happening is that it seems to be overlaying the existing portal row rather than creating another one. Freeze window Go to layout [item layout with the history portal in it] show all records go to record/request/page [first] loop go to portal row [last] set field [historical::value; item::value] ..then several more set field lines.. end if go to record/request/page [next;exit after last] end loop go to layout [original layout] When I first run the script it adds the portal row fine. If I change the value in the item record and rerun the script it seems to simply replace the values in the portal row rather than add another row with the new values. What am I doing wrong? Edited November 10, 2010 by Guest
Newbies cuitw Posted November 10, 2010 Newbies Posted November 10, 2010 What version of FileMaker are you using? Perhaps you can give the portal a name and add a go to object(the portal name) script step right before the step "go to last portal row".
Bonnerbl Posted November 10, 2010 Author Posted November 10, 2010 The problem isn't that it doesn't find the portal it does. It does add the portal row. The problem is that if you run the script again it doesn't add a second row. It seems to replace the values in the first row.
efen Posted November 10, 2010 Posted November 10, 2010 Add a commit records step in your script after setting the values in the related record
Bonnerbl Posted November 10, 2010 Author Posted November 10, 2010 Nope. Still not working. The first time I run the script I get portal rows as I expect. The next time I run the script it is not creating a second row. Looks like it is updating the existing row.
Bonnerbl Posted November 10, 2010 Author Posted November 10, 2010 What was missing was a go to field step before going to the portal row. I hadn't mentioned in my post that there was more than one portal on the layout. So #1 added the commit, #2 added the go to field. Works fine now.
Recommended Posts
This topic is 5126 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