Page 1 of 1

Relation statement

Posted: April 15th, 2019, 10:30 am
by AriSilva
According to the relation statement´s help, it defines a relationship between records.
That is very interesting, but I do not know how and where I can use this defined relation.
Can you give me an example on how to use it?
Is there an example of that in the cspro examples?
Best
Ari

Re: Relation statement

Posted: April 15th, 2019, 5:38 pm
by aaronw
Take a look at "CSPro\Examples 7.2\2 - Edits & Batch Programs\Dictionary Relations."

Here we link the FERT record to the POP record. This allows us to treat the two records as one which is convenient when we want to access information from related occurrences that are in different records. Once this link is established in our example we can access a mother's age (POP record) and her children's details (FERT record) without any additional work. Otherwise, we would manually, need to match the woman number to line number each time we wanted some information on a mother and her children.