Page 2 of 2

Re: Entry according to number of household

Posted: March 23rd, 2015, 7:14 am
by josh
And what happens when you try the code that uses currocc?

Really the roster control is the simplest solution though. I'm not sure why you don't want to use that.

Re: Entry according to number of household

Posted: March 23rd, 2015, 8:30 am
by MrTaco
The issue is that if I use a roster control, it won't work coz all the questionnaires are not having the same number of people in the household.

when i use the code it says " Compile failed" on the Logic View

Re: Entry according to number of household

Posted: March 23rd, 2015, 5:21 pm
by josh
The occurrence control field of the roster lets you have a different number of rows in the roster for each questionnaire. You create a variable in your dictionary for number of people in the household and set that variable as the occurrence control field. Then when keying in a household you enter the number of people for that household and the number of rows of the roster is adjusted automaticaly.

On the compile error, this probably a typo or a missing semicolon or something. Check the spelling of curocc(). I often put in the wrong number of r's or c's.

Re: Entry according to number of household

Posted: March 24th, 2015, 5:32 am
by MrTaco
Hi Josh

Can you please add the code for me

find the attached file

Thanks

Re: Entry according to number of household

Posted: March 24th, 2015, 7:18 am
by josh
Here are the two options - with occurrence control field and with logic.

Re: Entry according to number of household

Posted: March 24th, 2015, 8:12 am
by MrTaco
Thank you Josh...

That's what I wanted

Re: Entry according to number of household

Posted: November 26th, 2016, 9:08 am
by mclaren11
I'm not certain I comprehend what you are attempting to do precisely. Is every line of the list a man or a family unit? Is it true that you are attempting to confine the quantity of lines in the list? On the off chance that that is the situation then you might need to take a gander at utilizing the "occurence control field" in the list properties. To utilize right tap on the list and pick properties and under event control field enter the name (not name) of a variable in the word reference that will be filled in before you get to the list. CSPro will set the quantity of lines in the program to the estimation of this variable. For instance in the event that I have a variable NUMBER_OF_PEOPLE_IN_HOUSEHOLD on my frame before the list of family individuals then I could utilize this as the event control field.

Re: Entry according to number of household

Posted: November 8th, 2018, 1:53 am
by miyinzi
Dear Good People,

Can someone share a code that will enable me to implement a dynamic loop such that if a household has five members, only five rows appears and so on. Thanks. :)

Re: Entry according to number of household

Posted: November 8th, 2018, 4:39 pm
by aaronw
Take a look at the example projects Josh has already provided that demonstrate how to restrict the number of rows shown in a roster. One uses logic and the other uses a property called the occurrence control field.