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

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

Recommended Posts

Posted (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 by Guest
  • Newbies
Posted

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".

Posted

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.

Posted

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.

Posted

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.

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 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.