Newbies treinoza Posted June 19, 2007 Newbies Posted June 19, 2007 (edited) I have a relational database with three tables. After I create a new record in the parent table [Artists], I want to create a new item associated with this record in the Prints table. How do I copy the ID value in the parent table and transfer it to the new record in the prints table? In the Artist information layout, I have a script attached to a button that is called Add New Print that does the following: Got to Layout (Prints) New Record Set Field [Prints:Artist_ID; Artists::ID] It creates the new record but does not change the Prints:Artist_ID, therefore the two are not connected. Should I be using a look up value instead of a script that does the set field? Any help would be appreciated. Thanks so much! I've attached a screen shot of the relationships graph. Edited June 19, 2007 by Guest
mr_vodka Posted June 19, 2007 Posted June 19, 2007 Hi and welcome to the forums. Try this. Set Variable [$ArtistID; Artists::ID] Go to Layout [Prints] New Record [] Set Field [Prints:Artist_ID; $ArtistID] In your script you are going to the other layout but it doesnt know what to pouplate the field with because there is no related record in Artist. You ahve to temp store it in a variable or global field.
Newbies treinoza Posted June 20, 2007 Author Newbies Posted June 20, 2007 It works great now. Thank you, Mr. Vodka! You tha man!
Recommended Posts
This topic is 6425 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