Prefill multiple items with loadcase

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
cwells9
Posts: 5
Joined: April 20th, 2013, 11:30 am

Prefill multiple items with loadcase

Post by cwells9 »

Hi all,

I am having trouble prefilling a roster from an excel list. Basically, I am trying to prefill multiple items (variables across columns), as well as by row (curocc()). I am including screen shots of the roster. For some reason, I can get the first row to prefill, but then the second row doesn't recognize input. I am including the roster itself as well.

At the beginning of the survey, there is a village ID. HH ID is then input here automatically:
preproc
if curocc(P00) = 1 then
HH_ID(1) = "HH" + "1";
elseif
curocc(P00) = 2 then
HH_ID(2) = "HH" + "2";
...etc.
I have a dictionary with two ID items: the village ID, and the HH ID. I then have a separate dictionary for each (Name, Age, Grade, Etc.). Each one uses the village ID, and then in theory should read the HH ID, but there is something in that process that breaks down. Interestingly, if I put a separate HHID in row 1 (i.e. 7 instead of 1), the rest of the row pulls the correct corresponding info for that HHID.
Each variable in that roster has a PROC function resembling the following:
NAME
preproc
P00=curocc();
x=loadcase(PLT_TYPE_DICT,VILLAGE_ID,HH_ID) ;
if x =0 then errmsg("_____");
elseif x = 1 then
if curocc() = 1 then $ = HH_ID_1;
elseif curocc($) = 2 then $ = HH_ID_2;

Any help is appreciated!
Attachments
screenshotcspro.jpg
screenshotcspro.jpg (32.75 KiB) Viewed 2451 times
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Prefill multiple items with loadcase

Post by Gregory Martin »

It's hard to know what the problem is without seeing how your external dictionary and external data file look. If you could post your application here, or email cspro@lists.census.gov, we can look further.
cwells9
Posts: 5
Joined: April 20th, 2013, 11:30 am

Re: Prefill multiple items with loadcase

Post by cwells9 »

Thank you Gregory. I will send via email.
Post Reply