Complex TableRelation

GavrilaGavrila Member Posts: 12
Hi,
How can i realize complex table relation using TableRelation propert.?
e.g. I have tables T1, T2, T3 and i want realize lookup for T1.Code: Lookup(T3.Code where (T3.Name = field(T2.Name)).

Comments

  • nunomaianunomaia Member Posts: 1,153
    Table T1 must have fields with values from other tables. You can also make lookup by code, but this is the hard way.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • GavrilaGavrila Member Posts: 12
    nunomaia wrote:
    Table T1 must have fields with values from other tables. You can also make lookup by code, but this is the hard way.
    Thanks for reply.
    Is there no way to relate 2 tables using third???(((
  • DenSterDenSter Member Posts: 8,304
    If I understand you correctly, you have a table with two fields, relating to two different tables. What you want is to define the relationship of one field with the value of the other field.

    TableX, with two fields, Field1 and Field2.
    Field1 has a relationship to TableY, field TableY.Code, with a lookup into TableY
    Field2 has a relationship to TableZ, field TableZ.Code, AND where TableZ.Field1 = TableX.Field1

    Because you fill the first field, you can set that link into the other table, and it is based on the value from the first table. Take a look at the Item table (number 27), and the "Item Category Code" and "Product Group Code" fields (5702 and 5704) for an example, and pay attention to the validation code in the Item Category Code that makes sure the Product Group Code is correct.

    Is that what you are looking for?
Sign In or Register to comment.