0

Using fields from one table in another

Hello Everyone

 

I am new in Ninox and I have try to find an answer from my self, but I couldn't.

So:

I have 3 tables - Company, Machines and Info

I want to be able  to see in info "automatically" the machines that belongs to one customer.

Now - if I link the tables - I can chose from a list, but there are all machines in the Machines table.

I need to "save" only a few machines and this machines to be visible only if I have select this customer...

 

Thank you in advanced for your ideas!

5 replies

null
    • Mconneen
    • 4 yrs ago
    • Reported - view

    It sounds like you want to create an association table between Company (I assume that is your customer) and Machines (which is complete list of all machines) ...   Maybe call it "Company Machines" ..   Then.. populate that association with only the few machines a customer has.    I am not fully following what "info" does.. so I cannot comment on that. 

    dataModel

    All machines:

    machines

    And Company Machines:

    companyMachines

    • George_Tanev
    • 4 yrs ago
    • Reported - view

    This is quite clear.

    The question is - when I have more customers and each of them has a few machines...

    Actually it's a long story - I am trying to plan the work of my technicians.

    So - when I want to send them to a customer to repair one machine - I want to be able (in an Info table) to say - you go to this customer to repair this machine.

    So far - with the Links - I can do it, but when I open the machine table I am seeing all the machines inside (not only the machine from the selected customer).

    My question is - it's there a possibility to "filter" the machine list and see only the machines that are - somehow - associated to this customer?

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @George.. 

    Hmm.. OK.. So the "machine" is on the customers premise... and a single machine will be related to one and only one customer? 

    Assuming that is the case..   I would create a data model like this..   Create Machines as a composit of Company.. Why.. because a machine is at one and only one Customers / company site.   I called the "info" table a "Work Order".   Create a relationship from Work Order to Company .. and to Machine (this simple example assumes one work order per machine).

    dataModel

    Then.. On the Work Order Machine reference..   create a "constraint" such that when you select the Machine reference.. it will display machines only associated to the selected Customer. 

    workOrder

    Use a constraint like

    constraint

    And the pop up shows only those machines related to the selected customer. 

    theList

    • George_Tanev
    • 4 yrs ago
    • Reported - view

    What can I say - Master it's a Master!

    Now it's working. 

    There is only one very small detail - I have to be able to select not only one, but a few machines...

    • Mconneen
    • 4 yrs ago
    • Reported - view

    @George..  Well.. I did put out the disclaimer.. / assumption "(this simple example assumes one work order per machine)".. LOL.. 

     

    Try creating a "Work Item" composite table.. Assuming the "Work Order" is per Company.. you can leave the company at the "Work Order" level.. and then have multiple Work Items that have the reference to the Machines.. 

Content aside

  • 4 yrs agoLast active
  • 5Replies
  • 1241Views