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

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

Recommended Posts

Posted (edited)

Hi all newbie to filemaker. I have this script that I am writing to add the detail records to a separate table. It seems to work fine except it does not fill the key field with the proper value. I have checked the relationships and it is set to allow adds. It also works if I hard code it in the script. So it must not be pulling the value from the header table when it creates the detail. Can anyone help? Here is the code of the script. Thanks in advance.

Jeff Williams

project_script.jpg

Edited by Guest
Posted

You cannot refer to the related ProjectID, because at this point there is no related record in Projects. You need to load the currently viewed project's ID into a variable BEFORE going to the other table, e.g.

Set Variable [$projID ; Projects::ProjectID ]

Go to Layout [ Time ]

New Record

Set Field [ Time::ProjectID ; $projID ]

...

Or use the script parameter to "carry" the ProjectID.

This topic is 5633 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.