Linking other sections of the dictionary with the roster

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
Ayebian
Posts: 8
Joined: July 15th, 2017, 10:56 am

Linking other sections of the dictionary with the roster

Post by Ayebian »

Hello forum how can i link the roster with other sections of the dictionary
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Linking other sections of the dictionary with the roster

Post by Gregory Martin »

You'll have to post more details about what you're trying to do. What are you trying to link?
Ayebian
Posts: 8
Joined: July 15th, 2017, 10:56 am

Re: Linking other sections of the dictionary with the roster

Post by Ayebian »

Helo gregory thanks for the reply,i created a house hold roster listing all family members and their details in section A,now they are questions in other sections like the health section it starts with"who is responding to this section" i want the application to be able to bring a list of the members of the roster..also in the education section ther is a check for age(for members 10years and above) but age is in the roster..so i want other sections to be able to connect with the roster..thank you
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Linking other sections of the dictionary with the roster

Post by josh »

One way to do this is to use what call dynamic value sets. Instead of having the values in the value set fixed in the dictionary you can set them in your program logic using the setvalueset function to the names of the household members. This takes a little bit of programming but it is a very useful technique in this and other situations. For examples of this see the following:

CAPI Getting Started Guide:
https://www.census.gov/population/inter ... tarted.pdf

Lecture notes on dynamic value sets (look on page 8) that uses values from roster:
http://teleyah.com/cspro/SouthAfricaOct2016/05-CAPI.pdf
http://teleyah.com/cspro/SouthAfricaOct ... apter5.zip (example application that accompanies above)
Ayebian
Posts: 8
Joined: July 15th, 2017, 10:56 am

Re: Linking other sections of the dictionary with the roster

Post by Ayebian »

mr josh thanks the response but i dont have a fixed list of house hold members..i want section A to list them and other sections will refe to the listed members
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Linking other sections of the dictionary with the roster

Post by khurshid.arshad »

Dear Ayebian

Please use this code to view the household member list. You can amend based on your requirement.


You can view all male members from age 15 to 45

Code: Select all

j = count(PID where Age >=15 and Age <=45 and Gender =1 );

	do i=0 until i=j+1
		numeric seekpid=seek(PID where Age >=15 and Age <=45 and Gender =1, @i+1);
		
		if seekpid>0 then
			codes(i) = PID(seekpid);
			labels(i) = NAME(seekpid);
		else
		endif;
	
	
	enddo;
		codes(i-1)=notappl;	
		setvalueset($, codes, labels);

a.
Ayebian
Posts: 8
Joined: July 15th, 2017, 10:56 am

Re: Linking other sections of the dictionary with the roster

Post by Ayebian »

hello..i think if you can share a video link that would help better because I don't understand what "I","J" stand for..thank you
sah
Posts: 97
Joined: May 28th, 2015, 3:16 pm

Re: Linking other sections of the dictionary with the roster

Post by sah »

Hello,
can you share what you are doing so we can help out.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Linking other sections of the dictionary with the roster

Post by josh »

If you look at the example I posted links to in my earlier reply you will see that the household roster there is not fixed either. Using dynamic value sets (setvalueset) allows you to change the responses at run-time to reflect the list of household members entered in an earlier section. To do this you will have to write logic similar to what is in the example I posted (which is also similar to the logic that @khurshid.arshad posted).
Post Reply