protecting field in roster
Forum rules
New release: CSPro 8.0
New release: CSPro 8.0
protecting field in roster
So i am facing a problem. When I am in the roster form if am dealing with a man i don't want the fertility questions to be asked for that particular occurrence I don't even want the researcher to navigate back to that particular question. But when i use the set attribute for the occurrence it blocks all the fertility question for all other occurrences.
-
- Posts: 1777
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: protecting field in roster
What you need to do is have the protection code in an onfocus, which will get executed regardless of whether you're moving forward or backward in the roster. Something like this:
PROC FERTILITY_QUESTION
onfocus
if MALE = 1 then
setproperty(FERTILITY_QUESTION, "Protected", "Yes");
else
setproperty(FERTILITY_QUESTION, "Protected", "No");
endif;
onfocus
if MALE = 1 then
setproperty(FERTILITY_QUESTION, "Protected", "Yes");
else
setproperty(FERTILITY_QUESTION, "Protected", "No");
endif;