[EpiData-list] How to: relate files - how can I get only one record in sub files for each main record ?

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sat Oct 22 08:33:54 CDT 2005


Ziad asked: How to go for new record if you have two parts in EpiData?

> I have database made of two parts. When we finish data entry in "part 2",
> instead of moving to new record file, and we expect to see part 1, we get
> new record file in part 2.
>
I assume the situation is this:
a. enter data into file A
b. at latest field in file A perform a relate to file B based on unique ID
c. continue with more data in B
d. at last field in file B you wish to continue with next record in file A.

IF you specify in file A last field:
 after entry
    relate id fileB
end

Then after entering last field in file B you will have a new record in 
file B, but if you instead:

 after entry
    relate id fileB 1
end

then only one record will be entered in file B and you will return to file A

Example: qes files:
file a:
id <IDNUM>
v1 first field #
v2 date <dd/mm/yyyy>
v3 relate #

file b:
id #####
v1 first field #
v2 date <dd/mm/yyyy>
v3 relate #

Chk files:
file a:
id
  KEY UNIQUE 1
END

v3
  AFTER ENTRY
    RELATE id fileb 1
  END
END

file b:
id
  KEY UNIQUE 1
END


Kind regards
Jens Lauritsen
EpiData Association


More information about the EpiData-list mailing list