Page 1 of 1

Update a case from another application

Posted: September 3rd, 2018, 4:46 pm
by Don
Hi I have been trying to add data to a case in my control sheet app, from the questionnaire app. I have been trying this code:

Code: Select all

PROC DATE
postproc
	string idno = maketext("%V%V%V%V%3d%V",RNDNO,EDNO,PARNO,STRATUM,bldgno,HHNO);		//stores ID of listing
	loadcase(LISTING_DICT,idno);
	errmsg("Loadingcase:%V%V%V%V%3d%V,loaded case:%s",RNDNO,EDNO,PARNO,STRATUM,bldgno,HHNO,getcaselabel(LISTING_DICT));
	if LSTSTDATE = notappl then		//if date is blank then insert this date
		LSTSTDATE = $;
	endif;
	writecase(LISTING_DICT);
The getcaselabel statement returns a blank and it seems like no case is loaded. Is there a reason why no case is loaded? I'm pretty sure that I have the case ID correct.

Re: Update a case from another application

Posted: September 3rd, 2018, 4:55 pm
by Don
Never mind.
I just realised that I was trying to load and write cases to a csdb file in a different location. Once I pointed it to the correct location, it worked.