Default value for a question

Hi Friends,
Another issue. how do I add a default value to a question (Not variable but question)? Can anyone write the syntax for me.
Thanks.

Hi Jean,

It is not possible to assign a default value to a question. If a question has not been answered it will have a special value in the exported data indicating “not answered”.
However, you could kind of implement it by defining a variable which takes the answer of the question or a default value if the question was not answered. Like this variable expression:

IsAnswered(question_x) ? question_x : my_default_value

It’s not very nice though, since you will have an unanswered question in your interview!

Klaus

2 Likes

Hi Klaus,
You are my tutor today. Thanks! Let’s see if I understood, can it be written like that:
Question name is GroupSize

IsAnswered(GroupSize) ? GroupSize : 0

Don’t worry about the look. I need to skip some question and wish to set their values to 0. One more thing, I can replace the name by self.

Thanks

One last thing, I was reading what you wrote again. Do you mean that if I assigned a default value, the question will be counted as unanswered (I hope not)

Hi Jean,
Yes, that should work. The variable would be of type Long Integer in this case.

Klaus

1 Like

Thank you. I am testing the conditional operator and will revert back to you. Thanks once again.

The answer can be preloaded and will stay there until replaced by the interviewer.

To check which question types may be preloaded refer to the following table:
https://support.mysurvey.solutions/questionnaire-designer/design-limitations-by-question-type/

Best, Sergiy

Hi Sergiy,
Thank you. One more question,
How to preload an answer? or the link to the notes would be more helpful.

Thanks

see here

Hi Sergiy,

Checked! Thank you.