programmatically set whether a record is required?

Discussions about CSEntry
Post Reply
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

programmatically set whether a record is required?

Post by Anne »

Hi,
I'm pretty sure this is not possible, but I'll try anyway: Is it possible to set whether a record is required or not programmatically?

(I want most of my records to be required, but as my questionnaire is very, very long, I would like to be able to stop in the middle of the questionnaire, go to a field to choose something like "The respondent refused to finish the questionnaire", and then skip the rest of the questions/records and have the status of the questionnaire as finished (ie. not partial).

Anne
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: programmatically set whether a record is required?

Post by Gregory Martin »

There is no way to do this programmatically. Why not just set it as "not required"? Even with that setting, if you run in system-controlled mode, you still determine whether or not data is entered into a record. Even if a record is "not required," if your data entry program's path proceeds through the fields from that record, you will get that record in the data file. You control whether or not the path goes through fields from the record.
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Re: programmatically set whether a record is required?

Post by Anne »

Yeah, I was planning to do it like that I just thought it would be more elegant if I could do it programmatically.. :)

(and if I hadn't searched the manuals for it so that I was pretty sure the feature didn't exist, I would have expected it: There is already so much you can do programmatically, so why not this too :)

Thanks anyway..

Anne
Saint
Posts: 63
Joined: November 22nd, 2013, 4:59 am

Re: programmatically set whether a record is required?

Post by Saint »

Yes, there is so much you can do grammatically, but would always be nice if we could do more. Maybe you should repost in Feature Request. Being able to display each record (or Module) as a tab that enumerators can just jump to (once sufficient preliminary information has been provided) would be so cool. The strict path is good, but often time restrictive. I try to get around this by developing separate applications for each module and then using a menu to launch each of them once the necessary preliminary information has been provided. For example, once the roster is done, an enumerator can do a Youth module, the head can jump to consumption module, and then each child can do their own education module. More programming work than if the modules could be displayed as TABS (parallel blocks) instead of in one (sequential) path.
Anne
Posts: 104
Joined: January 11th, 2012, 12:55 am

Re: programmatically set whether a record is required?

Post by Anne »

I just discovered a big problem with Greg's approach at least on my android device:

When setting a record to be not required, all the "yes"/"no" questions get an option added - it becomes "yes"/"no"/"not applicable" - and this is really not cool! (This does not happen when I do testing in windows..)

How can I avoid this?

(update: After I made all records required, and then changed back to "not required", the problem went away, but this is very weird behavior :) Might it be because I've been playing back and forth between CSPro 6.2 and the new beta version?)

Anne
Saint
Posts: 63
Joined: November 22nd, 2013, 4:59 am

Re: programmatically set whether a record is required?

Post by Saint »

Hi Anne,
Yes, once you switch on records to required, the option NA is added to all numeric questions. Its not because you are switching between different version of CSPro or between Android and Windows.

You would have to PROGRAMMATICALLY switch on/off using: set behavior canenter(notappl|outofrange). Can be quite a pain, but enumerators also need a way to move on when the respondent declines to answer any questions. Afterall, we promise this in consent forms :)
Post Reply