Table Relation!!!!

HanenHanen Member Posts: 281

Hello,

I'm using the customer table and two others tables that I have created.
I have a customer No Field in both of my tables and when I set the propriety table relation to customer."customer No" in my first table it works but when I set the same propriety in my second table to "table 1".""Customer No. it didn't works :cry:
How can I deal with that problem, it's very urgent!!!!!

Thanks for the answer!!!


Regards

Hanen TALBI

Answers

  • garakgarak Member Posts: 3,263
    What will there not work?
    Will there a error message displayed or what is?
    when I set the propriety table relation to customer."customer No" in my first table it works

    U mean the repaltion to table customer field "No.". Field "customer No" doesn't exist in the table customer. Or is this a customized field?
    Do you make it right, it works too!
  • HanenHanen Member Posts: 281
    Yessss, the repaltion to table customer field "No." doesn't exist on the "customer No" field of the second table!!!!
    Regards

    Hanen TALBI
  • BeliasBelias Member Posts: 2,998
    mmmmm........does the customer code on your "second table" exists in your Customer table?
    if not, what did you expect to receive instead of an error? :wink:
    e.g.: if you have in your second table the field "customer no." populated with 'dskjfladsjf' value and you don't have a customer with code 'dskjfladsjf' in your customer table.
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • strykstryk Member Posts: 645
    Hi!

    Uhm ... I'm not sure if I understood this correctly ... :oops:

    So what we have is this (if I don't err):
    T18 "Customer"
    Table1: There is a field "Customer No." which relates to Customer."No." and works OK
    Table2: There is a field which relates to Table1."Customer No." which does not work.

    Right? If this is the case, then the reason is obvious: You can only relate to "Primary Key Fields" of the referred table!

    If Table1."Customer No." is relating to the Customer."No." it relates to the PK of table "Customer" - all OK.
    But if your Table2."Customer No." should refer to Table1."Customer No." this is only possible if "Customer No." is part of the PK in Table1 ...

    Could this be the issue? Could you just relate Table2."Customer No." to Customer."No." instead?
    Or did I get it wrong ?!?
    Jörg A. Stryk (MVP - Dynamics NAV)
    NAV/SQL Performance Optimization & Troubleshooting
    STRYK System Improvement
    The Blog - The Book - The Tool
  • vijay_gvijay_g Member Posts: 884
    hi.....
    as far i understand u r question, you have to put simply table name(customer) on the table relation propertey of that field.also check PK of both table.
  • krikikriki Member, Moderator Posts: 9,110
    [Topic moved from 'SQL General' forum to 'NAV/Navision' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • HanenHanen Member Posts: 281
    Thanks for yours answers,
    it was a problem with primary keys, now it works :wink: :thumbsup:
    Regards

    Hanen TALBI
Sign In or Register to comment.