Default answer not picking update a previous answers

C123 created the topic: Default answer not picking update a previous answers

I have a question that has a default answer that depends on the answer given earlier in the survey. However, this does not pull through. Here is the statement I'm using;

if(is_empty(DP1Q1), 'This question has not been answered', 'This question has been answered')

The odd thing is if I put the same statement in the question body it pulls through correctly. So the question body says that they have answered the question and the default answer says that they have not. Does anybody have any ideas?

C123 wrote: I have a question that has a default answer that depends on the answer given earlier in the survey.

What questiontype should be assigned a default answer.
Assigning a Textstring "This question has not been answered" as a value for a default answer seems not correct.Most common would be an answer or questioncode, but not a written text.

What version of LimeSurvey is used? Since you use a textfield you can assign text the way you do it.

{if(is_empty(DP1Q100),'This question has not been answered','This question has been answered')}

It's working. I only edited the textfield, but didn't change anything. The DP1Q1 is your post was DP1Q100 in your export. So no change by me. Perhaps you try again and check every variable. Perhaps you fixed it already.

C123 wrote: However, I have got full jumping turned on would that make a difference?

Fulljumping? I don't understand.

The default answer can only be set once, when the question is displayed.

Best approach using Limesurvey is using Group by Group mode.
Place the question in one group and the text question with the default answer expression in the next group. The default answer will be shown correctly.

Thanks, for your help I think I understand now, even though I'm using the group by group mode because I've got full navigation turned on once the group with the default answer group is visited it won't change even if the user goes back and changes the other answer.

It sounds to me that in order to have this dynamic, rather than using the default answer setting, you should be using an equation question with the Expression Manager assignment operator to set the question.

Some notes:

1) The equation question is best placed in a group following that of the question to be manipulated.
2) The equation question must be place in a group that will always be seen (not skipped via relevance).