Linking imported tables
I would like to preserve the linkage between two tables that I am importing from Filemaker into the Android version of Ninox. This is an N:1 relationship. I beieve that Ninox links records in tables that have been referenced to each other by an unchanging "Id" field. As the entries in each record's "Id" field in each table are different and unchanging, how does one set up a link between records (other than doing it manually, record by record). The table records were previously linked by a simple integer field called "Number" in Filemaker. I have set up the N:1 reference between the tables, but do not know how to have the master ("1") table reference the specific records in the subject("N") table. Thanks.
4 replies
-
Have you already imported the table from FM? If so then you can try something like this in a button in Table2 : Table1 = master, Table2 = subject. The reference field names would be same in the corresponding tables. In Table1 the reference table is called Table2 and vice versa. I know that can be confusing but that is how Ninox creates the reference field names.
let t := this; let findTable1 := unique(select Table1 where Number = t.Number); Table1 := findTable1
If this works like you want then you can use the Bulk Edit command in Table2 to finish the rest. You would modify it and put this in Assign Calculated Value for reference field Table1:
do as server let t := this; unique(select Table1 where Number = t.Number); end
-
oops, the code should use first() not unique().
let t := this; let findTable1 := first(select Table1 where Number = t.Number); Table1 := findTable1
and
do as server let t := this; first(select Table1 where Number = t.Number); end
-
Hi,
The easiest way is by following the steps below:The two tables need a shared key field, which is, in your case, "Number".
Content aside
- 1 yr agoLast active
- 4Replies
- 76Views
-
3
Following