Have an idea?

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

Defaulting a data record to -1 as opposed to blanks?

Hi Forum,

Can a data record start out as defaulting to a specific value instead of a blank?

For example, if you have a grid question (q1_r1, q1_r2, etc.) can those values be set (defaulty) to -1 and that value is overwritten only if a new (actual) response is given?

Hopefully that makes sense. Thanks.
asked Dec 5, 2017 by WTW_cal Bronze (1,375 points)
I don't think the default values of the database can be changed without some major modifications, but there may be acceptable alternatives.  For example, if you want Sawtooth Script to print out -1 for unanswered fields, that could be achieved with unverified Perl.  If you can tell me more about what you want to do with the -1 values, I may be able to help further.
Zachary, is one option to have the question answered and then use something like SetValue to set those variables that were not answered to -1?

It gives the same result but a little in reverse.
Yes, that's one option.

1 Answer

0 votes
The short answer is probably but you’ll need to use a custom javascript verification.  However, why do you want to do this?
answered Jan 7 by Corey1975 Bronze (720 points)
...