0

Sub-Tables - Add existing record

Has something changed with the new version (3.7.6) with regards to sub-tables?

When a table has a sub-table linked to it there are now two buttons on the sub-table to "Add existing record" and "Create record".  I don't remember the "Add existing record" button being there before.  Does anyone know a way of not showing it?

For example:  A master "Invoice" table may have a child sub-table to add "Invoice Items".  Clearly, when adding a new "Invoice" record you will then want to add "Invoice Items" that link back to the Invoice, so it makes sense to have a "Create record" button on the "Invoice Items" sub-table.

But what is the point of "Add existing record"?

Invoice Items wouldn't exist in isolation, and in fact the "Invoice Items" table would be marked as "hidden" to prevent orphan records being created, so there will never be "existing records".

Is it just me?

Does anyone know how to remove the "Add existing record" button that makes no sense in master/child table relationships?

6 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    Whenever I've created linked tabled (child or otherwise) they have always shown the two buttons (Add existing record and Create record). I don't use the web version so I don't know if there is difference but I don't think Ninox would change the UI that dramatically.

    I think that any linked tables would need both as Ninox is not sure what your work flow is. You could be creating the records in the many side and then want to link them on the 1 side. Why you would do that extra step I don't know, but at least you can.

    There are ways to remove some of the UI functions but that is for someone else who has done it to chime in.

    • Paul_Chappell
    • 1 yr ago
    • Reported - view

    Thanks Fred Yes you are right and Ninox have confirmed as much. I just can’t remember it working like this. Must be old age.

    The fact remains however that I can’t think of a use-case where a hidden child table would have any records relating to a main table that haven’t already been created via the main record in the first place. I suppose there could be a reason but it would be nice to be able to hide either button if it doesn’t fit the business model - such as the typical ‘invoice/invoice items’ where an item record could not exist in isolation (unless created programmatically when it should have already be linked to the invoice record). Thanks again for the reply.

    • Sean
    • 1 yr ago
    • Reported - view

    You can hide it with this formula in a Formula field...

    html("
    <style>
        .form .list-controls .list-button:first-child {display: none;}
    </style>
    ")
    

    For this to work the Formula field needs to be on the form where the sub-table is and you can't hide it using "Display field only, if:". You need to set "Label position" to "hidden" and set the background color of the Formula field to match your Form color.

     

    For what it's worth, I'm using the macOS app and I haven't updated to the latest version and it only displays "Create record" under the sub-table.

      • Paul_Chappell
      • 1 yr ago
      • Reported - view

      Sean Thanks for this!  I already use similar hidden formulas for controlling user access to Delete, Add, and Copy buttons etc, so this will be perfect! 

    • John_Halls
    • 1 yr ago
    • Reported - view

    Hi Paul

    I had a feeling that 'Add existing record' didn't show if composition is set to Yes, because in theory there shouldn't be any orphan child records to add. But there it is in this new version, so you may well be right in your original assumption.

    Regards John

      • Paul_Chappell
      • 1 yr ago
      • Reported - view

      John Halls Yes.  That was my thought.  Composition set to Yes combined with being Hidden should mean that a sub-table HAS to link to a master table. Making the 'Add existing record' button redundant as there will never be any loose records to add.  Maybe old age not getting to me just yet!

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 6Replies
  • 394Views
  • 4 Following