Hello - below are 2 questions I’m currently struggling with while editing
one of my apps.

(1) Making sure a numerical answer is not repeated
I have four integer questions in a row. The number entered must be 1-4 and
a number used in one of the four answers can’t be used in any of the other
three answers. For example, if you enter ‘1’ for the first question, you
cannot enter ‘1’ for the second, third, or fourth questions. Does anyone
know of any logic that would make this possible? I’ve been trying a few
different ways but none seem to do the trick. Any help would be great!

(2) Changing the value
For another integer question, I would like the user to be able to choose to
report in either weeks, months, or years. Is there any way to allow the
user to choose their units when they enter the number? If this is not
possible, does anyone have any suggestions for how else I could do this?

(1) if the possible answers only are 1, 2, 3 or 4, why don’t you use a
single choice question type for each questions ? If you stick to integer,
you can add something like regex(., ‘^[1-4]’). You could then set the
validation condition to be something like
- first question : . != /snd_quest and .!=/third_question and .!=
/fourth_question
- second question : . != /first_quest and .!=/third_question and .!=
/fourth_question
- third question : . != /snd_quest and .!=/first_question and .!=
/fourth_question
- fourth question : . != /snd_quest and .!=/third_question and .!=
/first_question

(2) I would do think in three steps :
- first ask for the value using an integer question (value)
- then ask for the unit using a single choice question (unit) with
options like weeks, months, years.
- then calculate the real value in a hidden value using the previous
questions as parameters - cond(unit=‘week’, *value7, unit=‘months’,
*value30,4, unit=‘years’, *value**365)

Does that help you ?

Michel

···
Le mercredi 26 octobre 2016 22:41:38 UTC+2, leb...@mail.harvard.edu a écrit :
>
> Hello - below are 2 questions I'm currently struggling with while editing
> one of my apps.
>
> (1) Making sure a numerical answer is not repeated
> I have four integer questions in a row. The number entered must be 1-4 and
> a number used in one of the four answers can't be used in any of the other
> three answers. For example, if you enter '1' for the first question, you
> cannot enter '1' for the second, third, or fourth questions. Does anyone
> know of any logic that would make this possible? I've been trying a few
> different ways but none seem to do the trick. Any help would be great!
>
> (2) Changing the value
> For another integer question, I would like the user to be able to choose
> to report in either weeks, months, or years. Is there any way to allow the
> user to choose their units when they enter the number? If this is not
> possible, does anyone have any suggestions for how else I could do this?
>
> Thank you!
> Leah
>