Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Warning and Errors while fielding the survey


I got this notice when I was fielding my survey for a test trial,  can somebody explain it further

Found Null character in the %in hash. Key: TTTOPractice2w_ans Value: 9.9 | 10 | 10

"the question is a free format question with quite a long Html"

Also, I got this warning:

The text "[�MAXDIFFVERSION()�]" cannot be saved to a Free Format hidden variable with data type set to "Decimal Number".

Should I change the data type to text ant that will solve the problem?

asked May 23, 2019 by AMYN Bronze (2,980 points)

1 Answer

+1 vote
It's difficult to fully diagnose what's going on without your HTML or study file, but I may be able to offer some insight.  It appears you want to save the results on MaxDiffVersion to a variable of a free format question on the same page, is that right?

The result of MaxDiffVersion tends to look something like this: "D - 8, T - mxd_1."  So you will need to use a text-type variable to store that, unless you want to use some JavaScript to strip out the non-numeric characters from that string.

I would also note that the MaxDiffVersion function can only be used in MaxDiff tasks.  It won't behave correctly in a non-MaxDiff question because the function can't be sure which exercise / task it is meant to be looking at.  One trick we can do to get around this is by moving the <input> element that is meant to store this variable from the free format question into the MaxDiff task itself.  It should look something like this:

<input name="ff_version" id="ff_version" type="hidden" value="[% MaxDiffVersion() %]"/>
answered May 23, 2019 by Zachary Platinum Sawtooth Software, Inc. (147,000 points)
Thank you very much, I have added the Code to the MaxDiff task and also a CBC task and it will probably be working fine