July 27, 201213 yr Hello, I'm adding a field to an existing database. I'd like this field to get a value from a field in another table based on two criteria. The tables (A and B are related by two criteria (1 and 2). Right now I have: If ( A1 = B::B1 AND A2 = B::B2; GetField ( B::B3 );"") But nothing happens. I'm a novice, so any suggestions on better code would be greatly appreciated.
July 27, 201213 yr It would probably be better to define a relationship between the two tables, based on matching the two fields. Then either place the third field on your layout, or fetch it through a calculation field. Note also that the GetField() function is not required here and will not work the way you have used it. P.S. Please use meaningful names for your tables and fields - we are not robots.
July 28, 201213 yr so, if you have two tables: A, B and you have the relationship (A::A1= B::B1 AND A::A2=B::B2), the VALID relationship is already set up. Just put the B::B3 field on the layout based on that relationship, as Comment says. no need for IF, no need for get field. or create a calculation: if( not IsEmpty (B::B3) ; B::B3 ; "" ) Beverly
Create an account or sign in to comment