Hi, i have problem when using the loadcase comment. My problem is that i want another form to be opened for open-ended questions. The external form works well but when it comes to the loading stage, there is no data stored in the data file. Even when I type something in it, it becomes blank when i go back to that field. I would be glad if you could help me on this.
Here is my code:
alpha(60) wothresp; { Other answers response }
numeric wothcode; { Other answers code }
{ Function to ensure proper entry and updating of "Other" answers }
function getother( alpha(10) questnum, questocc );
{ Create alpha id for other answers file }
{ If your ID is not 7 characters in length, remember to fix the length of the level 1 ID and of OTHID in OTHERS.DCF }
OTHID = concat(edit("999",D), edit("999", F));
OTHQUES = questnum; { question number }
OTHOCC = questocc; { occurrence for multiple section/group or
multipart question }
{ Get the previous response back if already entered
in case of backtabbing or updating }
if !loadcase(OTHERS,OTHID,OTHQUES,OTHOCC) then
{ Otherwise initialize to blanks }
OTHRESP = " ";
OTHCODE = 0;
endif;
wothresp = OTHRESP;
wothcode = OTHCODE;
end;
PROC H01
postproc
{ Get Other Answer }
if $ = 4 then
getother( GetSymbol(), 0 );
enter FL_OTHERS
endif;
loadcase
loadcase
- Attachments
-
- CensusofPopHousing.zip
- (7.14 KiB) Downloaded 280 times
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: loadcase
The function loadcase loads from an external file, but you will also need to update the file by using writecase. Try putting this at the bottom of your code:
PROC OTHSEC
writecase(OTHERS);
It will save the "other" data to the file after it has been entered on the external form.writecase(OTHERS);
Re: loadcase
Kindly check the following sample from
CSPro\Examples 7.1\1 - Data Entry\Using External Files & Forms
Re: loadcase
Oohhh you are right!!! I totally forget about the write case function Thank you very much