0

Linked tables

Hello,

I have a table "Customers" who are linked with a table "Invoices" who have a subtable "Items", when I create a new invoice from "Customers" the invoice are linked to the customer but when I'm created a new item from invoice the item are not linked to the customer.

Could you help me please.

Thierry

11 replies

null
    • Nick
    • 5 yrs ago
    • Reported - view

    I don't think what you asking is the right way.

    My way: 

    Create this formula field Invoice.Customer.Name in Invoice Items table, and every item will has the Name of the customer. Then you can report, group, filter etc.

    Nick

    • Thierrx_Grosjean
    • 5 yrs ago
    • Reported - view

    Your formula work

    Item

    But the link "Customer" are empty in Items subtable

    Invoice

    Here in Invoice table the link Customer are right.

    I just want to autofill Customer link in Items subtable.

    • Thierrx_Grosjean
    • 5 yrs ago
    • Reported - view

    PS Thank you for your help

    • Leonid_Semik
    • 5 yrs ago
    • Reported - view

    Hi Thierry,

    you can create a trigger "on create" in Items-table:

    ---

    let myC:=Invoice.Customer;

    Customer:=myC

    ---

     

    Leo

    • Nick
    • 5 yrs ago
    • Reported - view

    I don't think this is possible, or at least I don't know how...

    There are links between:

    - Customer -> Invoice

    - Invoice -> Invoice Items 

    - Invoice Items -> Products

     

    but there is NOT: Invoice Items -> Customer.

    Look at the data model:

     

    Screen Shot 2018-08-04 at 13.56.40

    • Leonid_Semik
    • 5 yrs ago
    • Reported - view

    I think he has created duplicate linking to the Customer table.
    It is not useful but possible

    Customer -> Invoices

    Invoices -> Items 

    Customer -> Items 

    Leo

    • Nick
    • 5 yrs ago
    • Reported - view

    Thanks Leo for the info...

    And, while we are here, can we use more than one "on create" trigger?

    Nick

    • Thierrx_Grosjean
    • 5 yrs ago
    • Reported - view

    Yes Leo, I do it to have a view of items sell directly from customer view

    • Leonid_Semik
    • 5 yrs ago
    • Reported - view

    @Thierry,

    With the new feature "View" you no longer need an additional link. 

    Bildschirmfoto 2018-08-04 um 13.34.05

    Formula

    ---

    Invoices.Items

    ---

    @Nick,

    You can write several commands with semicolon

     

    Leo

    • Nick
    • 5 yrs ago
    • Reported - view

    Thanks again @Leo,

    and "one more thing", the new feature "View" is fantastic!

    Nick

    • Thierrx_Grosjean
    • 5 yrs ago
    • Reported - view

    Leo, it didn't work!

    Leonid, fantastic "view" are what I want to see ;)

    Many thanks for your help.

    Thierry

Content aside

  • 5 yrs agoLast active
  • 11Replies
  • 4464Views