jeffw Posted June 23, 2009 Posted June 23, 2009 (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 Edited June 23, 2009 by Guest
comment Posted June 23, 2009 Posted June 23, 2009 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.
jeffw Posted June 23, 2009 Author Posted June 23, 2009 That worked perfect. Thank you as always. Great help!
Recommended Posts
This topic is 5982 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