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
-
mgkavisan
- Posts: 9
- Joined: July 10th, 2019, 1:27 am
Roster row is showing empty
You do not have the required permissions to view the files attached to this post.
-
Gregory Martin
- Posts: 1948
- 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;
-
mgkavisan
- Posts: 9
- Joined: July 10th, 2019, 1:27 am
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
You do not have the required permissions to view the files attached to this post.
-
aaronw
- Posts: 571
- Joined: June 9th, 2016, 9:38 am
- Location: Washington, DC
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);