Jump to content
Server Maintenance This Week. ×

Create record related table.


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

Recommended Posts

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

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

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

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 by Guest
corrected a misleading typo :)
Link to comment
Share on other sites

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