stefanshotton Posted April 5, 2006 Share Posted April 5, 2006 Using the separation model, so have clients table in one file and client calculations table in another file. When a record is created in the client file it generates a serial number value in a field called Client ID. Client calculations table also has a client ID field. This is the match field for the relationship, ive ticked the box 'Allow creation of records in this table via this relationship' under the client calculations table. I thought this would mean that when i created a record in the client table a new record would also be created in the client calulations table with the same ID, but it doesnt work. What am i doing wrong?! Link to comment Share on other sites More sharing options...
Zero Tolerence Posted April 5, 2006 Share Posted April 5, 2006 Creating Related records does not work that way. Heres how it works. Say you have a two tables, tablea and tableb, each table has three fields, field1, field2, field3, and you have them related. In addition, tableb has field4, field5, and field6. IF you have Allow creation of records turned on for tableb, you would create a record like this(from tablea). SetField[tableb::field4; "Value"] SetField[tableb::field5; "Value"] SetField[tableb::field6; "Value"] When you do either of those three steps, it creates a record in field b, and autofills in the value's for field1, field2, and field3, since those were related. Tell me if that didn't help, and I'll try and explain it a little better. Link to comment Share on other sites More sharing options...
stefanshotton Posted April 5, 2006 Author Share Posted April 5, 2006 so if i got this right the field "value" is in could be a dummy field that you just enter a 1 into? and that would cretate the record? trying this method as i dont like having to goto layout ,add new record via a script step as paranoid that the database will get out of sync with serial numbers in multiple tables.(there are 4 tables 5 including the master i will need to do this with) Link to comment Share on other sites More sharing options...
stefanshotton Posted April 5, 2006 Author Share Posted April 5, 2006 Works great, thanks. Is there a way to get this to work on a one to many scenario? Create a new record in the many via a script? without having to do the whole got layout, create record thing? Link to comment Share on other sites More sharing options...
Søren Dyhr Posted April 5, 2006 Share Posted April 5, 2006 (edited) Even in the separation model can't a layout cover more than one TO (well one directly and one just related) ...as far as I can tell, so you need to have an extra layout for the many TO, in order to make a record in the calcfield file. Well again, I'm not sure! --sd Edited April 5, 2006 by Guest corrected a misleading typo :) Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6731 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