Retrieve a field from one table in another
I have a database dedicated to events. In this database there is a table called “contracts” and another one called “processing” In the first table (contracts) there is a field that indicates the delivery date which is called “delivery date”. I would like to return this field automatically to the “processing” table as well. Obviously the delivery date refers to a specific record that has a name “Name” in contracts table which in the table “processing” is called “job name”. What kind of formula could I use? Thank you!
16 replies
-
Is there a link to contracts in the processing table?
Can you list the direction N:1 or 1:N between the tables in events and in processing? When you edit the reference field it shows you the direction at the top of the edit window.
-
said:
I can in the table “processing” retrieve data from the table “contracts”If you want to get delivery date in contracts from processing then something like the following in a formula field:
contracts.'delivery date'
assuming you haven't change the name of the reference field to something besides the default contracts.
-
Unfortunately, it does not work because the records are not associated. I tried. do this formula however there is something wrong:
let nomematri := 'job name';
if cnt(select 'contracts' where 'name' = nomematri) then
'contracts'.'deliverydate'
end -
my mental path is this: search the “contracts” records for the memory where “name” is equal to the name in “processing.jobname” and return me the delivery date
-
said:
Unfortunately, it does not work because the records are not associated.How can they not be "associated" when you said that there is a link between processing and contracts?
Can you upload a test DB?
-
The table in which I would like to insert the field is “Lavorazioni” while the table from which I would like to take the record is “Contratti matrimoni” The record is called “Consegna entro il”
-
thank you! I found the solution and the right formula! I found it because of your advice in another post that I had missed:
let curRec := this;
first((select 'Contratti matrimoni')['Nome matrimonio in contratti' = curRec.'Nome job relativo'].'Consegna entro il')
Content aside
- Status Answered
- 1 mth agoLast active
- 16Replies
- 70Views
-
2
Following