loop in a roster

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
pkkp4060
Posts: 6
Joined: July 6th, 2021, 2:58 am

loop in a roster

Post by pkkp4060 »

Hi team,
I have a query wherein need to loop few variables in a roster.

Variable names : Structure no, Address, Households_in_the_structure, Name_of_eldest, Total_male_persons, Do_you_want_to_add_structure

This is a roster. In this roster say the 3rd variable Households in the structure is 4 Then in such case, Name of eldest and total male persons will be repeated 4 times. Once this done in the last variable Do you want to add structure is entered as Yes (code 1) then again the 1st variable Structure no should open up for entry.

Hope the above written is understandable. Can you share some logic for implementation.

Thanks in advance.
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: loop in a roster

Post by sherrell »

I understand what you want to do, but unfortunately you'll have to do it a little bit differently.

Could I first ask, what are the unique identifiers for a case? For it sounds like the structure number would be the unique case ID.

If so, Address and Households_in_the_structure should be placed in a singly-occurring record (i.e., a non-repeating record).

Name_of_eldest and Total_male_persons would go into a repeating record, which would form your roster. You'll need to stipulate when defining the record how many times this record can repeat--whatever that maximum is, it should agree with the valid range for the question Households_in_the_structure.

Do_you_want_to_add_structure is unneeded.

I don't know if you have other variables you wished to collect, but this is the overall framework you would need to use.

Sherrell
Post Reply