Newbies tmallus Posted September 12, 2002 Newbies Posted September 12, 2002 Is there a way to create a record in a related file conditionally? For example: If two files (File A and File are joined by a primary key ID. In File A... If field_ONE="1" , then create a new record in the related file B and display the contents of FIELD_X and FIELD_Y in File B. Else if FIELD_ ONE contains any other value, do not create a record in the related File B. Thanks in advance...
LiveOak Posted September 12, 2002 Posted September 12, 2002 There are two ways to create a related record: 1) Use a script, in which case the script can perform whatever tests you wish before creating the related record 2) Attempt to write to a related field (Relationship::FIELD_X or Relationship::FIELD_Y) on a layout. If the corresponing relationship is set to "allow creation of related records" AND no related records currently exist, on will be created using the primary(left side) key. This key can be a calculated field: cKey (calculation, stored) = If(field_ONE = 1, Key, "") If related records already exits, the contents of FIELD_X and FIELD_Y of the first matching record will be displayed and another new record WILL NOT be created. -bd
Recommended Posts
This topic is 8469 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