hi members
i m new member for cs pro
actually geting error in roster part
in my case i need to preload last wave data in roster 1 then if the persons are not present then those are present in the household members need to show in roster 2 i tried that
preproc
// Prefill in names in names roster from enumerator data file
numeric numPreloadIndividuals = count(HH_IDMSIZEROSTER000);
do numeric x = 1 while x <= numPreloadIndividuals
if ID005(x)= 1 then
HH_LINEID(x)=x;
HH_OLDLINE(x) =ID(x);
CV002A(x) = F_NAME(x);
CV002B(x) = L_NAME(x);
endif
enddo;
i need remove the empty row from the list whose are not present
pls help me frnds
Roster row is showing empty
Roster row is showing empty
- Attachments
-
- roster1.JPG (126.17 KiB) Viewed 2675 times
-
- roster 2.JPG (70.89 KiB) Viewed 2675 times
-
- Posts: 1845
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Roster row is showing empty
Use two counters: one for the data from which you're copying, and one for the destination rows:
// Prefill in names in names roster from enumerator data file
numeric numPreloadIndividuals = count(HH_IDMSIZEROSTER000);
numeric destinationRow = 0;
do numeric x = 1 while x <= numPreloadIndividuals
if ID005(x)= 1 then
inc(destinationRow);
HH_LINEID(destinationRow) = x;
HH_OLDLINE(destinationRow) = ID(x);
CV002A(destinationRow) = F_NAME(x);
CV002B(destinationRow) = L_NAME(x);
endif;
enddo;
numeric numPreloadIndividuals = count(HH_IDMSIZEROSTER000);
numeric destinationRow = 0;
do numeric x = 1 while x <= numPreloadIndividuals
if ID005(x)= 1 then
inc(destinationRow);
HH_LINEID(destinationRow) = x;
HH_OLDLINE(destinationRow) = ID(x);
CV002A(destinationRow) = F_NAME(x);
CV002B(destinationRow) = L_NAME(x);
endif;
enddo;
Re: Roster row is showing empty
thank you Gregory Martin
its working
one more help is need
ID008a question i choosed other members is the current household head
i need to put the member in first row in the household roster 2 what i choosed in ID008A
its working
one more help is need
ID008a question i choosed other members is the current household head
i need to put the member in first row in the household roster 2 what i choosed in ID008A
- Attachments
-
- roster2.JPG (122.33 KiB) Viewed 2633 times
-
- roster1.JPG (209.92 KiB) Viewed 2633 times
Re: Roster row is showing empty
You'll use the response from ID008A as an index into roster 1's name variables. Assign them to the 1st occurrence of roster 2's name variables. Will look similar to this:
CV002A(1) = F_NAME(ID008A);
CV002B(1) = L_NAME(ID008A);
CV002B(1) = L_NAME(ID008A);