0

UNION selections

I want to be able to pull records from 2 (very similar) child tables and present all those records in a single list when viewing the parent record. I could easily achieve this in SQL using UNION, but I cannot see how in Ninox or even if it is possible. So far I can only see that I would need two 'reference' fields in the parent's form, one to each of the child tables. While that is not unusable, I would prefer if I could simply view everything in a single list.

Is it possible to achieve such a UNION?

Is it in fact possible to insert SQL code into Ninox? Since it is based on SQLite, would it not make sense to allow direct SQL to be used rather than having to invent a new database scripting language. That wheel has already been invented many years ago and works rather well. It's called SQL.

2 replies

null
    • Alain_Fontaine
    • 3 yrs ago
    • Reported - view

    Parent table: "Table1". Child tables: "Table2" and "Table3". Reference fields with their default names.

    In "Table1", add a "View" layout element, and populate it with the expression:

    array(Table2, Table3)

    Then play with the column definitions of the "View" element.

    • UKenGB
    • 3 yrs ago
    • Reported - view

    That's great. Thank you for that.

Content aside

  • 3 yrs agoLast active
  • 2Replies
  • 281Views