[EpiData-list] Merge & Relate issue

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Fri Feb 17 07:18:03 CST 2012


Good morning to all the list,

I'm experiencing a problem with my own epidata questionnaire setup, defined as follows:

MENU.qst
- Q1.qst
----Q1_1qst
- Q2.qst

MENU is just a initial menu that allows the user to select the questionnaire they want to enter or edit. Depending on entered number, the user is redirected using a IF…ELSE construct, like this:

IF selection = 1 THEN
	RELATE code q1 1
ENDIF
IF selection =  2 THEN
	RELATE code q2 1
ENDIF


In MENU.qst, Q1.qst and Q2.qst there is a key, defined in each case as KEY UNIQUE 1, while 
Q1_1 is related to Q1 using the same key as Q1, but is defined as KEY 1.

When I try to merge together Q1 and Q2 everything goes fine, but when I try to export the data in Excel format the process exits with an error about the newly generated checkfile. In particular, the problem lies in the fact that the key in the new checkfile is defined simply as KEY 1, and not as KEY UNIQUE 1. However, to relate Q1 to Q2 needs the key to be defined as UNIQUE. I don't see any reason why while merging the new checkfile defines the key as not unique, since the codes are still unique also in the merged file.

There is any workaroud for this?

Thank you,
Dario Vianello


More information about the EpiData-list mailing list