Professional Documents
Culture Documents
Sample SearchAndSelect
Sample SearchAndSelect
start starttime
end endtime
deviceid deviceid
subscriberid subscriberid
simserial simid
phonenumber devicephonenum
calculate nplots
calculate plot1description
calculate plot1size
calculate plot2description
calculate plot2size
calculate plot3description
calculate plot3size
calculate plot4description
calculate plot4size
calculate plot5description
calculate plot5size
calculate plot6description
calculate plot6size
calculate plot7description
calculate plot7size
calculate plot8description
calculate plot8size
calculate plot9description
calculate plot9size
calculate plot10description
calculate plot10size
Christopher Robert:
Normally, you would just have one method of
eliciting the household ID. This form is a bit more
complex than usual because it demonstrates two
different methods in a single form.
contains
appearance
ne method of
orm is a bit more
emonstrates two
m. organized
Christopher
Robert:
This shows all
regions in the .csv
fie.
Christopher Robert:
search('hhplotdetails') This shows all districts
within the chosen
region.
search('hhplotdetails', 'matches', 'regionid', ${hhidregion})
Christopher Robert:
This shows all villages within the selected district.
search('hhplotdetails', 'matches', 'districtid', ${hhiddistrict})
search('hhplotdetails', 'matches', 'villageid', ${hhidvillage}) Christopher Robert:
This shows all
households within the
selected village.
field-list organized
minimal
organized
constraint constraint message relevance disabled required
yes
Christopher Robert:
Only show if
respondent consents. ${consent}=1
yes
Christopher Robert:
Only show selections if they
selected that option.
Otherwise, skip.
Christopher Robert:
This shows all districts yes
within the chosen
region.
${hhidentrychoice}=1 yes
${hhidentrychoice}=2
Christopher Robert:
This searches the
household field for the
text entered by the user
(with the search type also
selected by the user).
Christopher Robert:
This searches the
household field for the
text entered by the user
(with the search type also
selected by the user).
Christopher Robert:
Only show if the nplots field is blank
(which indicates that plot data was
not found for the current
household).
Christopher Robert:
Only show if we have pre-loaded
empty(${nplots}) data (otherwise, nplots will be
blank).
not(empty(${nplots}))
yes
Christopher
Robert:
Only ask about
plots that they
actually have.
Christopher
Robert:
Only ask about
plots that they
actually have.
Christopher Robe
This expression c
her Robert: household ID dep
w search fields if was selected or f
cted that option. fields can refer to
se, skip. is valid however i
household ID dep
was selected or f
fields can refer to
is valid however i
pher Robert:
how if we have pre-loaded
therwise, nplots will be
repeat_count media:image media:audio media:video
Christopher Robert:
This expression calculates the appropriate
household ID depending on whether it
was selected or found. That way, later
fields can refer to just one hhid field that
is valid however it was determined.
household ID depending on whether it
was selected or found. That way, later
fields can refer to just one hhid field that
is valid however it was determined.
Christopher Robert:
Pull the nplots value from the
hhplotdetails.csv file, for the row in which
the hhid_key column has the value
entered into the hhid field.
note
response_note publishable minimum_seconds
choice_filter
Christopher Robert:
Only show as many choices
as plots that they have.
filter <= ${nplots}
list_name value label image
yesno 1 Yes
yesno 0 No
hhidentrymethod 1 Multiple-choice selections
hhidentrymethod 2 Search region for household
searchoption contains Contains
searchoption matches Matches
searchoption startswith Starts with
searchoption endswith Ends with
region regionid region
district districtid district
village villageid village
hhid hhid_key household
plot 1 ${plot1description}
plot 2 ${plot2description}
plot 3 ${plot3description}
plot 4 ${plot4description}
plot 5 ${plot5description}
plot 6 ${plot6description}
plot 7 ${plot7description}
plot 8 ${plot8description}
plot 9 ${plot9description}
plot 10 ${plot10description}
filter
1
2
3
4
5
6
7
8
9
10
form_title form_id version
Sample Form - Preloading - Search and select samplepreloadsns 2201050208
public_key submission_url default_language
english
The survey worksheet
This worksheet specifies all of the groups, questions, and other fields in your survey form,
each in its own row. Aside from overall settings and lists of multiple-choice options,
everything about your survey form is specified in this worksheet.
For more help, see the following help topic: How do I design my form?
type name
This column specifies the type of the field or This column specifies the name of the field
group. It has to follow a pre-specified or group. Field names must be unique, and
format, and Excel's conditional formatting they cannot include any spaces or
has been used to auto-highlight rows that punctuation. Example: age
appear to have a valid type column -- so, if
you are using Excel and your row is not
automatically highlighted, re-check that you
have entered the type properly. See below
for an exhaustive list of brief examples.
text fieldname
text fieldname
integer fieldname
decimal fieldname
select_one listname fieldname
geopoint fieldname
geoshape fieldname
geotrace fieldname
barcode fieldname
date fieldname
date fieldname
datetime fieldname
datetime fieldname
image fieldname
image fieldname
image fieldname
image fieldname
audio fieldname
video fieldname
file fieldname
note fieldname
start fieldname
end fieldname
deviceid fieldname
subscriberid fieldname
simserial fieldname
caseid fieldname
phonenumber fieldname
comments fieldname
calculate fieldname
calculate_here fieldname
text audit fieldname
audio audit fieldname
audio audit fieldname
audio audit fieldname
begin group groupname
…
end group groupname
begin repeat repeatname
…
end repeat repeatname
begin repeat repeatname
…
end repeat repeatname
speed violations count fieldname
speed violations list fieldname
speed violations audit fieldname
Operation Operator
Addition +
Subtraction -
Multiplication *
Division div
Modulus mod
Equal =
Not equal !=
Greater-than >
>-or-equal >=
Less-than <
<-or-equal <=
Or or
And and
Not not()
Function
once(expression)
once(random())
pulldata(csvname, colname,
lookupcolname, lookupval)
string-length(field)
count-selected(field)
selected(field, value)
selected-at(field, number)
jr:choice-name(value, 'field')
regex(field, expression)
number(field)
int(field)
string(field)
date(string)
date-time(string)
format-date-time(field, format)
today()
now()
uuid()
version()
username()
duration()
hash(fieldorvalue, …)
linebreak()
rank-index(index, repeatedfield)
rank-value(fieldorvalue, fieldorlist)
de-duplicate(string, field)
distance-between(geopointfield1,
geopointfield2)
area(repeatedgeopointfield)
short-geopoint(geopointfield)
pow(base, exponent)
log10(fieldorvalue)
sin(fieldorvalue)
cos(fieldorvalue)
tan(fieldorvalue)
asin(fieldorvalue)
acos(fieldorvalue)
atan(fieldorvalue)
atan2(x, y)
sqrt(fieldorvalue)
exp(x)
pi()
label label:languagename
For those field types that present a user Any label:languagename column (e.g.,
interface, this column is where you put the label:tamil) may be added in order to
primary text for the question or field. You provide labels in an alternative language.
can include line-breaks in your label text by
pressing Alt+Enter on Windows or
Control+Option+Enter on a Mac.
Standard group
Example
once(random())
once(random())
pulldata('hhplotdata', 'plot1size', 'hhid_key',
${hhid})
string-length(.) > 3
count-selected(.) >= 1
selected(${fieldname}, 'Male')
selected-at(${fieldname}, 0) = 'Shona'
jr:choice-name(selected-at($
{selectmultfield}, 0), '${selectmultfield}')
indexed-repeat(${name}, ${names}, 1)
substr(${phone}, 0, 3)
coalesce(${id}, ${id2})
round(${interest_rate}, 2)
regex(., '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.
[A-Za-z]{2,4}')
format-date-time(${fieldname}, '%Y-%b-%e
%H:%M:%S')
format-date-time(today(), '%Y-%b-%e')
once(format-date-time(now(), '%Y-%b-%e
%H:%M:%S'))
uuid()
version()
username()
duration()
hash(${name}, ${birthdate})
linebreak()
rank-index(1, ${random_draw})
rank-value(${random_draw}, $
{list_of_draws})
de-duplicate(' ', join(' ', ${repeatedfield}))
distance-between(${start_gps}, ${end_gps})
area(${gps_reading})
short-geopoint(${location})
pow(1+${annual_interest_rate}, $
{years_of_interest})
log10(${field})
sin(${field})
cos(${field})
tan(${field})
asin(${field})
acos(${field})
atan(${field})
atan2(${fieldx}, ${fieldy})
sqrt(${field})
exp(${fieldx})
pi()
hint hint:languagename
Text in this column, if any, will appear Any hint:languagename column (e.g.,
italicized beneath the field's label. You can hint:tamil) may be added in order to
include line-breaks in your hint text by provide hints in an alternative language.
pressing Alt+Enter on Windows or
Control+Option+Enter on a Mac.
default appearance
If you want to default the user's entry or For field types that allow multiple
selection for a given field, you can specify a appearances, you can specify the
number or some text in this column. appearance style in this column (e.g., quick
or minimal for select_one fields). See the
Alternatively, you can specify an expression individual examples below.
for dynamically calculating the field's
default entry or selection, in the calculation
column. See the following help topic for
more details: How can I provide default
entries or selections for users filling out my
form?
numbers
quick
minimal
compact
compact-3
quickcompact
quickcompact-3
minimal
compact
compact-3
no-calendar
annotate
draw
signature
p=50
p=50;s=0;d=60
p=50;s=0-600;d=60
p=50;s=firstfield;d=lastfield
v=5;d=120
constraint constraint message
Enter an expression into this column to If the user tries to move forward but the
validate entered or selected values. The constraint expression is false, a generic
user will only be allowed to proceed to the "That entry is invalid" message will appear;
next question when the expression to override this message on a field-by-field
evaluates to true. Use the constraint builder basis, enter another message into this
to build new constraint expressions. (Also column.
see the expression quick-reference
following the examples below.) Example: . <
130
espondentname', ${nametofind})
respondentname', ${nameprefix})
espondentname', ${namesuffix})
espondentname', ${nametofind})
espondentname', ${nametofind}, 'villageid', ${villageid})
espondentname', ${nametofind})
respondentname', ${nameprefix})
espondentname', ${namesuffix})
espondentname', ${nametofind})
This worksheet is for the configuration of option lists for your multiple-choice questions.
For regular option lists, all possible options will be listed here, one option per row. For
option lists that will be dynamically loaded from a pre-loaded .csv file, there will be a
single row that indicates from which .csv columns to load the option values, labels, and
images (see the following help topic: How do I dynamically load multiple-choice options
from pre-loaded data?).
list_name value
This column specifies the name of a This column specifies the internal value
multiple-choice question type (without any stored for a given choice. (It should really be
spaces or punctuation). A given list of called "value" rather than "name".)
options will involve multiple rows, each with Example: 1
the same list_name. Example: yesno
If dynamically loading from a pre-loaded
.csv file, this should instead be the .csv
column name from which to load option
values.
label label:languagename
This column specifies the label to use for a Any label:languagename column (e.g.,
given choice, in the form's default language. label:tamil) may be added in order to
Example: Yes provide labels in an alternative language.
This worksheet contains overall settings for your form, all specified in the second row of
the worksheet. When you download a form template from your SurveyCTO server, these
settings will be pre-filled for you.
form_title form_id
This is the title of your form. If you begin This is the unique ID that will identify the
this title with TEST - (as in "TEST - form. While the form title can have spaces
Household listing survey"), it will not appear and can be changed from time to time, the
by default to users (see the following help form ID must not contain spaces and must
topic: How can I prevent forms from remain fixed for the life of the form. The
appearing until after I am finished testing form ID must also begin with a letter, and it
them?). can only include letters, numbers,
underscores, and hyphens (no other
punctuation or special characters). Example:
hhlisting_round1
version public_key
This is the version number of the form, This is the public key with which to encrypt
which you must increase each time you all form submissions. See the following help
modify an existing form. If you started with topic for details: How do I encrypt my data?
a form template or with one of the sample
forms, then this is automatic: the version is
set to a formula that automatically
increments every minute. (Otherwise, you
need to increment the version number
yourself, taking care to keep the number of
digits fixed; the version has to be a single
whole number, and its number of digits has
to stay the same from one version to the
next. The convention is to always use a ten-
digit number that represents the current
date and time, e.g., 1401130917 for 9:17AM
on January 13, 2014. Alternatively, you can
use 10-digit numbers like 0000000001 and
0000000024 or 3-digit numbers like 001 and
024.)
submission_url default_language
This is the submission URL to use when This is the name of the language associated
submitting encrypted forms. See the with labels, images, and other content when
following help topic for details: How do I no other language is specified. For example,
encrypt my data? the label:french column is clearly in French,
but the label column, which will display by
default, is in an unknown language. Put the
name of that default language here. See the
following help topic for details: How do I
translate my form into multiple languages?