using the sysparm() function
Posted: March 29th, 2016, 12:23 pm
Hi,
I am using a menu/launcher to direct my enumerator to one of 8 questionnaires. In most of the 8 questionnaires, the case id will be a 5 digit ID which I have them enter in the launcher. I used the sysparm() function to pass this 5 digit ID onto the other questionnaires when the pff launches. I encountered two problems:
1) as soon as one case is saved, another case would automatically be added and that would cause the sysparm() function to pass that same ID to the new case resulting in a duplicates error! I solved this problem by adding a stop(1) function in the postproc of the questionnaire. That way the data entry program closes in between cases, and every new case that is added will have the unique ID entered in the launcher.
2) even though i solved the previous problem, now I have an issue where if the enumerator decides to pause a case and renter another completed one, the sysparm() function causes the case id of the completed case to change! Is there a function (similar to the ispartial function) that can return if a case is completed? and that way I could do something like:
PROC IDVAR
preproc
if iscomplete() then
skip to othervar;
else
idvar=sysparm("ID")
endif;
That might be the wrong way to think about this so I am open to a totally different suggestion
Thanks,
M
I am using a menu/launcher to direct my enumerator to one of 8 questionnaires. In most of the 8 questionnaires, the case id will be a 5 digit ID which I have them enter in the launcher. I used the sysparm() function to pass this 5 digit ID onto the other questionnaires when the pff launches. I encountered two problems:
1) as soon as one case is saved, another case would automatically be added and that would cause the sysparm() function to pass that same ID to the new case resulting in a duplicates error! I solved this problem by adding a stop(1) function in the postproc of the questionnaire. That way the data entry program closes in between cases, and every new case that is added will have the unique ID entered in the launcher.
2) even though i solved the previous problem, now I have an issue where if the enumerator decides to pause a case and renter another completed one, the sysparm() function causes the case id of the completed case to change! Is there a function (similar to the ispartial function) that can return if a case is completed? and that way I could do something like:
PROC IDVAR
preproc
if iscomplete() then
skip to othervar;
else
idvar=sysparm("ID")
endif;
That might be the wrong way to think about this so I am open to a totally different suggestion
Thanks,
M