catboy Posted November 26, 2006 Posted November 26, 2006 I'm still learning my way round filemaker relational tables and i have found this forum great help but I have hit a wall I have a contacts table and a quotes table and I want a "new quotes" button on the contacts page so that when you hit the button it takes you to the quotes layout and populates the contact id fk field (so that you dont have to enter the contact details again. A helpful soul on this site sent me a sample file and it worked exactly how i wanted and i have studied it over and over again but even though I think I have set mine up in the same way it does not seem to work. Can you please take a look at the attached file and see where I am going wrong? thanks. promos-lite.fp7.zip
Genx Posted November 26, 2006 Posted November 26, 2006 Don't have time to look at the file but best bet is that you dont have allow creation of related records on in the define database relationships window (b/w your two Table OccurnaceS) (i'll take a look tommorow if you haven't worked it out yet)
catboy Posted November 26, 2006 Author Posted November 26, 2006 Thanks for you prompt respose. You were correct. I did not have that option checked. I got all excited and checked the boxes but it has not solved my problem. Any other ideas?
aldipalo Posted November 26, 2006 Posted November 26, 2006 Check out changes to your script. HTH Al promos-lite_Copy.zip
catboy Posted November 26, 2006 Author Posted November 26, 2006 (edited) that works great - thanks a lot. could i ask you one more favour if you have a minute? I'm not learning anything by just using your script unless i understand it. Could you explain the first 2 steps so i can use them in future - especially what $CntID is Thanks. Edited November 26, 2006 by Guest
Genx Posted November 26, 2006 Posted November 26, 2006 $CntID is a "variable"... It acts as ummm.... a pointer to a value that you give it... For example, if you were to set $CntID to the value of your field, using the SetVariable[] Script Step, and then later reference $CntID, you will be retrieving the value that you gave $CntID So If you use Set Variable[ $CntID ; MyTable::MyField ] # Here, $CntID takes on the value of MyTable::MyField at this point in time Go To Layout[ SomeOtherLayout ] Set Field[ MySecondTable::MySecondField ; $CntID] # Here, you are setting MySecondTable::MySecondField to be equal to the value we stored earlier in $CntID (which happens to be equal to the value in MyTable::MyField). As for my original suggestion, i thought a different method was being employed to create the related records, so just discard the comment.
Recommended Posts
This topic is 6633 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