Record with item list

Discussions about CSEntry
Post Reply
Reb
Posts: 9
Joined: June 16th, 2015, 11:12 am

Record with item list

Post by Reb »

Hi,

I have a question regarding a form where a record is composed by a list of 10 items (10 different rows) and three questions (columns).

I would like to know whether it is possible to ban to skip any row (the three questions for all 10 items have to be entered) before moving to the next record.
On the contrary, I can fill only the first and the last row by using the mouse and move to the next record.

Thank you
Rebecca
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Record with item list

Post by josh »

If I understand your question correctly I think that it would also be solved by using system controlled mode. As I mentioned in the other post system controlled mode has other implications so please read the online help on it.
Reb
Posts: 9
Joined: June 16th, 2015, 11:12 am

Re: Record with item list

Post by Reb »

Dear Josh,

yes, the system-controlled mode avoids skipping rows when I enter the data regarding an item list.

But now I have the opposite problem!
In this mode, how can I move to the next record if I do not need to enter data for all designed rows (for example, when the total number of household members is less than the tot number of rows)?
With respect to the operator-controlled mode, I can not use the End group option (in Navigation).

Is there any way to enter an item list shorter than the total number of rows in a system-controlled mode?

Thank you
Rebecca
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Record with item list

Post by josh »

You have two options:

1. Use an occurrence control field in the roster.
This is an additional variable in your dictionary that you add to the form that determines the number of rows of the roster. You link it to the roster by right clicking on the roster and entering the name of the variable under "occurence control field".

2. Use logic
Add logic in one of the roster fields that calls endgroup to end the roster. For example the SimpleCAPI application that you can find in the CSPro examples directory checks if the name is blank and ends the roster if it is.

The attached application uses both approaches. In section B (Adults) the logic in the last field in the roster row, MORE_PEOPLE, uses endgroup if the user indicates that there are no more people. In section C (children) it uses the occurence control field. On the form above the roster there is a field, NUMBER_OF_CHILDREN, that is linked to the roster via the occurence control field. If you enter, 2 in this field, the roster adjusts to have only 2 rows.
Attachments
ExampleSurvey.zip
(16.67 KiB) Downloaded 443 times
Reb
Posts: 9
Joined: June 16th, 2015, 11:12 am

Re: Record with item list

Post by Reb »

Dear Josh,

thank you.
The "occurrence control field" works very well!

Now I have an additional problem:
can I impose in the system-controlled mode that one field can not be blank?

Thank you
R.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Record with item list

Post by josh »

In system controlled mode CSPro will not let you enter blank values in fields by default. If you want to allow the user to enter a blank value for a field in system controlled mode you have to explicitly allow it using the logic command set behavior() canenter(notappl).
Reb
Posts: 9
Joined: June 16th, 2015, 11:12 am

Re: Record with item list

Post by Reb »

Dear Josh,

thank you.

The system-controlled mode allows blank field for ALPHA data type and not for NUM type.

Can I impose to not have blank field also for ALPHA data?

Thank you
Rebecca
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Record with item list

Post by josh »

For alpha fields you can either add a value set to the variable or you can prevent blanks in logic. Using a value set only makes sense if there are a limited set of options but not for free text like a name or address. To use logic you would do something like:

PROC myalpha
if strip(myalpha) = "" then
errmsg("Please enter a non-blank value");
reenter;
endif;
Post Reply