Now, i found that if i use datatype as text and put readonly (yes), It look
same as note. But i'm not sure, will it create a field in table of database?
Can i set the value to this field automatically? Because I have a value
that don't change and i want to store at the same as survey data.
If you want to set a value at survey-time and have it appear in the data as
a normal field, use a calculate field. Easy! (And if you want to show it in
a note, have a label that shows the calculated field...)
As we've discussed previously, I believe that only SurveyCTO currently
allows setting calculated default values for UI fields (i.e., for field
types other than "calculate").
Best,
Chris
···
On Wed, Aug 6, 2014 at 8:10 AM, Bunhann Thou wrote:
Dear all,
Now, i found that if i use datatype as text and put readonly (yes), It
look same as note. But i'm not sure, will it create a field in table of
database?
Can i set the value to this field automatically? Because I have a value
that don't change and i want to store at the same as survey data.
Does this mean having text field as read only and using calculate to calculate the field saves the data in the database as was being asked in the question @crobert ?
SurveyCTO has a range of options for dynamic defaults, calculations that happen only once a certain point in a survey is reached (and then not thereafter), and more -- but at this point I'm less sure of core ODK's capabilities along these lines. Certainly you can have a "calculate" field -- but if you want something dynamic in a "text" field, I'm not sure... So I'll let somebody more knowledgeable reply...
Just to be clear (ie pedantic), any field can be shown back to users in labels and hints (including calculated fields, read-only fields with defaults, you-name-it...).