0

Do I need a Join Table?

I created two tables that hold all my data: Clients and Assets.  I created a third table to display data from both.  I created a View to show the Assets and created a Dynamic Choice box to choose a client.

I want to be able to pick a client from a drop-down box - and display their related assets below that.  I'm lost as to how I can do this.  Seems like I'm missing a basic understanding of how this should be implented.

Any help would be appreciated.  Thanks.

8 replies

null
    • John_Halls
    • 3 yrs ago
    • Reported - view

    Hi Dave

    There's no need for a third table. The assets will show in the clients form anyway. If there are a number of other fields being displayed that clutter the view then you could create a tab to just show the assets for that client. Tabs can be found in Edit Fields... and then go to Add Layout Element. In the field order make your clients ( with a left arrow against it) the last field and drag the tab to be just above this. Your form will now have two tabs with the second one just showing the assets.

    Regards John

    • dave.2
    • 3 yrs ago
    • Reported - view

    Thanks John!

    That worked great, but what I'm trying to do is choose a Client from a drop-down box, instead of searching or clicking through the records back and forth.  Then, after choosing the client, the Assets will appear below on the same page/tab.  Can this be done within the existing Clients form?  Thanks again.

    • Fred
    • 3 yrs ago
    • Reported - view

    Is there a 1:N relationship between clients and assets? If so John is correct that assets should be showing up on each of the client records.

    • dave.2
    • 3 yrs ago
    • Reported - view

    Yes the assets do show up, works great.  I'm trying to make finding Clients easier for me.  I'd like to be able to pick what client I want to see from a drop down box. After choosing the client, their Assests show up.

    Right now I have to either search or click through the forward/back buttons to move through records.

    • Fred
    • 3 yrs ago
    • Reported - view

    Right, then you can use a dashboard, which is a new table that has only 1 record, which you only view in form mode.

    You would create a link to your Clients table. Then create a view (the view from Layout Element) on the form that looks into your assets table based on your client you select. Which was the direction you were heading.

    The formula for your view would be:

    let xCust := Customer;

    select Assets where CustomerID = xCust.CustomerID

    of course the names would be modified to match your exact table and field names.

    • dave.2
    • 3 yrs ago
    • Reported - view

    Fred, thank you very much, that did it!  I just discovered Ninox yesterday, so I'm brand-new to it.  So far I really like it.  Can you recommend a book or something where I can learn more?  I never would've found this solution without posting here.  Thanks again.

    • Fred
    • 3 yrs ago
    • Reported - view

    There is nothing written that is very good. There is a company called Nioxus (https://nioxus.com/) that provides a basic monthly membership that provides access to their video vault that I've found very helpful. They hold weekly webinars that teach you different aspects of the app and ask questions. You can also get support help from them as well.

    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    You could send a mail to support@ninox.com, asking to be invited to the "Webinar DE 2021" and "Webinar EN 2021" teams. You will discover a lot of example databases. Of particular interest is the "0001_Ninox-Reference" database, containing a description of all commands and functions.

Content aside

  • 3 yrs agoLast active
  • 8Replies
  • 939Views