clrblue Posted August 6, 2002 Posted August 6, 2002 I have a situation where I have two db that must relate to each other by two fields... for example, "title" and "location", and it needs to pull the info from a record to fill other fields if and only if those two fields match each other. I tried the following without success in a field called address. RelationshipA was built between db1 and db2 through the location fields. RelationshipB was built through the title fields: "address" field calc: If ( (title = ::relationshipA:title) and (location = ::relationshipB:location), ::relationshipA:address, "" ) I am not getting any errors, but nor am I getting anything in the address field. I also just tried using relationshipA, thinking maybe that since location and location were already related, i didn't need to reiterate it: "address" field calc: If ( title = ::relationshipA:title, ::relationshipA:address, "" ) Still didn't work. I have related info before and am really not sure what I am doing wrong. I welcome all advice & suggestions. Thanks! KC
LiveOak Posted August 6, 2002 Posted August 6, 2002 I think you are not getting many answers because we can't understand the question. To relate two files by two fields, you must create a "compound" key. You don't need all the IF statements, just create compound key fields in each file as follows: Key (calculation, text, indexed) = title & location Relate the two files by matching Key with Key. Your related address field is then just: Relationship::Address Sounds like you need a little help with the concept of relationships. -bd
Recommended Posts
This topic is 8484 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