First of all, the formula for the random number is "wrong". Not wrong per sé, as it will generate a random number between 1 and 2. However, this will happen whenever this question is triggered, so the random number might change throught the survey, which I am sure is not what you want.
You should use something like (given that the equation question is called "random" based on your conditions that you show later):
[code]{if(is_empty(random.NAOK), rand(1,2), random.NAOK)}[/quote]
What does this do differently? It also creates a random number between 1 and 2, but only if there hasn't been set a number yet (if the equation question is still empty). If there has been created a random number previously, it will stick to this number. So the random number will be drawn once and then stay the same throughout the whole survey. Otherwise, it could happen that the random number is drawn again for the same respondent, which means you might have different random numbers throughout the survey.
Regarding the consent: I wouldn't do this via conditions, as you need to give EACH question a condition. I would use a zero quota (a quota that allows zero responses for a specific answer), this way you can easily "screen out" people who do give a certain answer (e.g. in your case that do not consent, but it could also be used if you only want male respondents and want to screen out all female respondents or the other way round. Just as an example).
Help us to help you!
- Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
- Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.