Hi,

I am first time user. I need help with something I think I am not

understanding about ODK.

What I would like to do is to allow only people who fulfull one condition

to continue with the survey. This condition has to do with two variables,

one integer number (bigger than 1 million, called *"id"*) and one text

variable (one digit, called *"v"*).

Specifically, what I want to do is:

-Take the first digit of the integer number *id* (for example if it is

26.928.928 take the 2)

-Multiply it by 4 (2*4=8)

-Divided it by 3. (8/3)

-Calculate the remainder (2). The answer could be either 0,1 or 2.

If is different from 2, then the righ answers for v is 2.

If is 0 or 1, the right answer for v is x.

*I would like to allow to the survey continue only people with the right
answer in "v".*

For the moment, I am creating a calculation row in the same page, "v2",

that has, in the calculation value, the next (i am using surveycto):

if(((int(substr(string(${rut}), 0,1)))*4 mod 3)!=2,.=2,.=x)

But It appears that "Dependency cycles amongst the xpath expressions in

relevant/calculate", so I am not doing it right.

*-Do you know why the expression is not working?*

*-If it works, I imagine that it would create a new variable with the

results of the expression (2 where the reminder is different from 2 and x

if the result is *

*2). How can I manage to stop the survey if this "v2" is different from
"v"?*

*Thanks a lot!*