


Hi all,
I' m creating a survey were the recipient can answer giving a score from 0 to 10. I want to save the answer in an data of type Integer.
I've chosen Integer 8 bit (-128 to 127) as data type but when the user select 0 as answer then the score is not saved (if i mark the answer as mandatory it doesn't go to the next page).
If i define that the value linked to the label 0 is -1, then the value saved in 255.
It seems that even if the data type chosen is Integer 8 bit (-128 to 127), it cannot store non positive values.
I would like to store 0 in the database to have clean data.
Thank you
Views
Replies
Sign in to like this content
Total Likes
Hi @federico__
If you want to save the value 0 as part of your survey response, then you should add a constraint against this data field as notNull="false" which would allow null values to be stored.
By default, fields having datatype as integer have the constraint notNull="true" which doesn't allow to store null values and a value 0 is considered as null for integer datatype.
Views
Replies
Sign in to like this content
Total Likes