Linking records via formula
How do I link records in a formula? In a record in TBL_C, I want to link all records from TBL_A and TBL_B that are not already linked to a record in TBL_C. How can I do this?
Each record in TBL_C has a 1:N reference to TBL_A called TBL_A_REF and a 1:N reference to TBL_B called TBL_B_REF. The field in TBL_A that references (N:1) TBL_C is called TBL_C_REF, and likewise for TBL_B.
From a function in a record in TBL_C, I think I can get a handle to the records from TBL_A that are not already linked to any record in TBL_C by doing
select TBL_A where cnt(TBL_C_REF)=0
But I don't know how to add these records to TBL_C_REF. How do I do this?
**Correction** The last sentence should say:
But I don't know how to add these records to TBL_A_REF in the record in TBL_C.
I have a similar setup and would love to hear the answer to this too!
you need to find out the ID of the datarecord a past it into the the reference field (TBL_C_REF). Then you can link the tables via the "Update multiple records..." function.
I am not sure how the records of the tables A and C refere to each other. Do they have a key field with a matching content?
A very simple formula to do the connection is the following, but I hope it will show the principle:
let t1 := 'First Name';
(select Personen)['First Name' = t1].Id
Where can i find a manual or more details about the language used here for programming so I can study and learn this on my on...please point me in the right direction.
Our Reference of Functions and Language can be found in our User Manual here:
Kind regards, Jörg