[XLS Help] Piping Names and Phone Number Constraint

Hi ODK Community,

I'd like to know if there is an xls syntax for piping the respondent's Name
(ex. Matt), such that when the next question comes up (ex. What is [NAME's]
gender?), the [NAME's] automatically changes to the respondent's actual
Name (ex. What is Matt's gender?).

Secondly, I need some help with constraining the phone number such that the
enumerator is required to entering a phone number that is between 7-10
characters (integers) long, with the country code as the required integers
for the first three characters. Is there a way to accomplish that in xls?

Thank you for the help!

Michael

Michael

Both of these are somewhat advanced operations.

For the first, you need to add something like this for the prompt
label. So if you wanted to ask someone their age, you'd put this:
"Hello, . What is your age?"

For the second, you need a regular expression constraint (read
http://www.regular-expressions.info/ for more). For example, this
constraint will allow only alphanumeric input that is 4 characters
long.
regex(.,'[A-Z0-9]{4}')

Hope this helps,

Yaw

··· On Fri, Sep 14, 2012 at 10:21 AM, m_optimal wrote: > Hi ODK Community, > > I'd like to know if there is an xls syntax for piping the respondent's Name > (ex. Matt), such that when the next question comes up (ex. What is [NAME's] > gender?), the [NAME's] automatically changes to the respondent's actual Name > (ex. What is Matt's gender?). > > Secondly, I need some help with constraining the phone number such that the > enumerator is required to entering a phone number that is between 7-10 > characters (integers) long, with the country code as the required integers > for the first three characters. Is there a way to accomplish that in xls? > > Thank you for the help! > > Michael > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Hi Yaw, i'm trying to specify the format of the phone number where i can insert characters such as: 11-111111
Is there a sintax in odk/xls to specify this kind of format that would characters and not only numbers?
P.S: i dnt want the question type to be a 'text'.

Appreciate your feedback.

Greetings!
I'm trying to use regex, but, appearance is not showing as numbers only,
could anyone provide further assistance -seems this is a very old thread-?
I want a mobile number only as answer
type= text name= mobile number label=Mobile Number required=yes
constraint_message=10 digit number! appearance=numbers

Also, remember that integers are limited by binary representation to 9
decimal digits. If you want something longer (e.g., 10 numbers) then make
sure to use a string data type and not integer.

Gaetano

··· On Fri, Sep 14, 2012 at 7:30 AM, Yaw Anokwa wrote:

Michael

Both of these are somewhat advanced operations.

For the first, you need to add something like this for the prompt
label. So if you wanted to ask someone their age, you'd put this:
"Hello, . What is your age?"

For the second, you need a regular expression constraint (read
http://www.regular-expressions.info/ for more). For example, this
constraint will allow only alphanumeric input that is 4 characters
long.
regex(.,'[A-Z0-9]{4}')

Hope this helps,

Yaw

On Fri, Sep 14, 2012 at 10:21 AM, m_optimal mmanansala@optimalsolutionsgroup.com wrote:

Hi ODK Community,

I'd like to know if there is an xls syntax for piping the respondent's
Name
(ex. Matt), such that when the next question comes up (ex. What is
[NAME's]
gender?), the [NAME's] automatically changes to the respondent's actual
Name
(ex. What is Matt's gender?).

Secondly, I need some help with constraining the phone number such that
the
enumerator is required to entering a phone number that is between 7-10
characters (integers) long, with the country code as the required
integers
for the first three characters. Is there a way to accomplish that in xls?

Thank you for the help!

Michael

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

Thank you very much Yaw and Gaetano. Just to be clear, when you mention
"prompt label" you mean the column named "label", yes?

Best,
Michael

··· On Friday, September 14, 2012 10:31:21 AM UTC-4, Yaw Anokwa wrote: > > Michael > > Both of these are somewhat advanced operations. > > For the first, you need to add something like this for the prompt > label. So if you wanted to ask someone their age, you'd put this: > "Hello, . What is your age?" > > For the second, you need a regular expression constraint (read > http://www.regular-expressions.info/ for more). For example, this > constraint will allow only alphanumeric input that is 4 characters > long. > regex(.,'[A-Z0-9]{4}') > > Hope this helps, > > Yaw > > > On Fri, Sep 14, 2012 at 10:21 AM, m_optimal <mmana...@optimalsolutionsgroup.com > wrote: > > Hi ODK Community, > > > > I'd like to know if there is an xls syntax for piping the respondent's > Name > > (ex. Matt), such that when the next question comes up (ex. What is > [NAME's] > > gender?), the [NAME's] automatically changes to the respondent's actual > Name > > (ex. What is Matt's gender?). > > > > Secondly, I need some help with constraining the phone number such that > the > > enumerator is required to entering a phone number that is between 7-10 > > characters (integers) long, with the country code as the required > integers > > for the first three characters. Is there a way to accomplish that in > xls? > > > > Thank you for the help! > > > > Michael > > > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en >

Hi Yaw,

I have a question about the regex constraint you mention below. I tested
this out (as a constraint in xls forms) and found that it restricts the
number of digits correctly but only allows input that begins with letters.
I'd like to be able to restrict to alphanumeric input, regardless of
whether it begins with numbers or letters. Is this possible? Can you please
advise as to the constraint that would accomplish that.

Thanks so much for your help.

Best,
Audrey

··· On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote: > > Michael > > Both of these are somewhat advanced operations. > > For the first, you need to add something like this for the prompt > label. So if you wanted to ask someone their age, you'd put this: > "Hello, . What is your age?" > > For the second, you need a regular expression constraint (read > http://www.regular-expressions.info/ for more). For example, this > constraint will allow only alphanumeric input that is 4 characters > long. > regex(.,'[A-Z0-9]{4}') > > Hope this helps, > > Yaw > > > On Fri, Sep 14, 2012 at 10:21 AM, m_optimal <mmana...@optimalsolutionsgroup.com > wrote: > > Hi ODK Community, > > > > I'd like to know if there is an xls syntax for piping the respondent's > Name > > (ex. Matt), such that when the next question comes up (ex. What is > [NAME's] > > gender?), the [NAME's] automatically changes to the respondent's actual > Name > > (ex. What is Matt's gender?). > > > > Secondly, I need some help with constraining the phone number such that > the > > enumerator is required to entering a phone number that is between 7-10 > > characters (integers) long, with the country code as the required > integers > > for the first three characters. Is there a way to accomplish that in > xls? > > > > Thank you for the help! > > > > Michael > > > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en >

Use regular expressions (regex). Something like
regex(.,'[0-9]{2}-[0-9]{6}') would be what you'd use as the constraint
for your example. For the regex to work, you should use a text prompt,
but with appearance=numbers.

Yaw

··· -- Need ODK consultants? https://nafundi.com provides form design, server setup, in-field training, and software development for ODK.

On Mon, Oct 5, 2015 at 3:05 PM, melebanonunite@gmail.com wrote:

Hi Yaw, i'm trying to specify the format of the phone number where i can insert characters such as: 11-111111
Is there a sintax in odk/xls to specify this kind of format that would characters and not only numbers?
P.S: i dnt want the question type to be a 'text'.

Appreciate your feedback.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

appearance=numbers

Note: this appearance setting changes the Keyboard style of the pop-up
keyboard to the calculator / number keyboard when you attempt to enter data
into the field. It does not prevent non-numbers from being entered. This
relies upon the device's keyboard supporting and reacting to this setting (
http://developer.android.com/reference/android/text/InputType.html#TYPE_NUMBER_FLAG_SIGNED
).

You need to add a constraint restricting the input string to something that
looks like a phone number.

e.g.,

for a ten-digit number:

regex(${mobile},'^[0-9]{10}$')

··· On Tue, May 10, 2016 at 10:17 PM, Sergio Del Villar wrote:

Greetings!
I'm trying to use regex, but, appearance is not showing as numbers only,
could anyone provide further assistance -seems this is a very old thread-?
I want a mobile number only as answer
type= text name= mobile number label=Mobile Number required=yes
constraint_message=10 digit number! appearance=numbers

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

In XLSForm, the syntax is slightly different -- you would enter "Hello,
${firstName}. What is your age?" in the 'label' column.
This substitutes the value from the question who's 'name' column is
'firstName' into the question text.

There are several examples of this in the sample xlsform
http://opendatakit.org/wp-content/uploads/2012/05/sample_xlsform.xls

Mitch

··· On Fri, Sep 14, 2012 at 11:19 AM, m_optimal < mmanansala@optimalsolutionsgroup.com> wrote:

Thank you very much Yaw and Gaetano. Just to be clear, when you mention
"prompt label" you mean the column named "label", yes?

Best,
Michael

On Friday, September 14, 2012 10:31:21 AM UTC-4, Yaw Anokwa wrote:

Michael

Both of these are somewhat advanced operations.

For the first, you need to add something like this for the prompt
label. So if you wanted to ask someone their age, you'd put this:
"Hello, . What is your age?"

For the second, you need a regular expression constraint (read
http://www.regular-**expressions.info/http://www.regular-expressions.info/for more). For example, this
constraint will allow only alphanumeric input that is 4 characters
long.
regex(.,'[A-Z0-9]{4}')

Hope this helps,

Yaw

On Fri, Sep 14, 2012 at 10:21 AM, m_optimal <mmana...@**optimalsolutionsgroup.com> wrote:

Hi ODK Community,

I'd like to know if there is an xls syntax for piping the respondent's
Name
(ex. Matt), such that when the next question comes up (ex. What is
[NAME's]
gender?), the [NAME's] automatically changes to the respondent's actual
Name
(ex. What is Matt's gender?).

Secondly, I need some help with constraining the phone number such that
the
enumerator is required to entering a phone number that is between 7-10
characters (integers) long, with the country code as the required
integers
for the first three characters. Is there a way to accomplish that in
xls?

Thank you for the help!

Michael

--
Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@**googlegroups.com
Options: http://groups.google.com/**group/opendatakit?hl=enhttp://groups.google.com/group/opendatakit?hl=en

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

The example I used was just uppercase. Try [A-Za-z0-9]{4} if you want
to include lower case.

··· On Wed, Jan 30, 2013 at 10:28 AM, wrote: > Hi Yaw, > > I have a question about the regex constraint you mention below. I tested > this out (as a constraint in xls forms) and found that it restricts the > number of digits correctly but only allows input that begins with letters. > I'd like to be able to restrict to alphanumeric input, regardless of whether > it begins with numbers or letters. Is this possible? Can you please advise > as to the constraint that would accomplish that. > > Thanks so much for your help. > > Best, > Audrey > > > On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote: >> >> Michael >> >> Both of these are somewhat advanced operations. >> >> For the first, you need to add something like this for the prompt >> label. So if you wanted to ask someone their age, you'd put this: >> "Hello, . What is your age?" >> >> For the second, you need a regular expression constraint (read >> http://www.regular-expressions.info/ for more). For example, this >> constraint will allow only alphanumeric input that is 4 characters >> long. >> regex(.,'[A-Z0-9]{4}') >> >> Hope this helps, >> >> Yaw >> >> >> On Fri, Sep 14, 2012 at 10:21 AM, m_optimal wrote: >> > Hi ODK Community, >> > >> > I'd like to know if there is an xls syntax for piping the respondent's >> > Name >> > (ex. Matt), such that when the next question comes up (ex. What is >> > [NAME's] >> > gender?), the [NAME's] automatically changes to the respondent's actual >> > Name >> > (ex. What is Matt's gender?). >> > >> > Secondly, I need some help with constraining the phone number such that >> > the >> > enumerator is required to entering a phone number that is between 7-10 >> > characters (integers) long, with the country code as the required >> > integers >> > for the first three characters. Is there a way to accomplish that in >> > xls? >> > >> > Thank you for the help! >> > >> > Michael >> > >> > -- >> > Post: opend...@googlegroups.com >> > Unsubscribe: opendatakit...@googlegroups.com >> > Options: http://groups.google.com/group/opendatakit?hl=en > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >

There is no template feature for numeric input. If you want to enter/have
non-numeric characters, you must use a text field.

And note that regex() only works on string values. If your field stores an
integer data type, you must convert the value to a string before using
regex.

I.e., for integer input, you could use:

regex(string(.),'...')

BUT, the value of string(.) would be after whatever you entered was
converted to an integer, then printed back out. So if you entered 0004,
string(.) would be just 4.

··· On Mon, Oct 5, 2015 at 5:07 AM, Yaw Anokwa wrote:

Use regular expressions (regex). Something like
regex(.,'[0-9]{2}-[0-9]{6}') would be what you'd use as the constraint
for your example. For the regex to work, you should use a text prompt,
but with appearance=numbers.

Yaw

Need ODK consultants? https://nafundi.com provides form design, server
setup, in-field training, and software development for ODK.

On Mon, Oct 5, 2015 at 3:05 PM, melebanonunite@gmail.com wrote:

Hi Yaw, i'm trying to specify the format of the phone number where i can
insert characters such as: 11-111111
Is there a sintax in odk/xls to specify this kind of format that would
characters and not only numbers?
P.S: i dnt want the question type to be a 'text'.

Appreciate your feedback.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups "ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks! It works!

··· On Wednesday, May 11, 2016 at 12:01:49 PM UTC-5, Mitch Sundt wrote: > > appearance=numbers > > Note: this appearance setting changes the Keyboard style of the pop-up > keyboard to the calculator / number keyboard when you attempt to enter data > into the field. It does not prevent non-numbers from being entered. This > relies upon the device's keyboard supporting and reacting to this setting ( > http://developer.android.com/reference/android/text/InputType.html#TYPE_NUMBER_FLAG_SIGNED > ). > > You need to add a constraint restricting the input string to something > that looks like a phone number. > > e.g., > > for a ten-digit number: > > regex(${mobile},'^[0-9]{10}$') > > > > > > > > > > > On Tue, May 10, 2016 at 10:17 PM, Sergio Del Villar <sgd...@gmail.com > wrote: > >> >> Greetings! >> I'm trying to use regex, but, appearance is not showing as numbers only, >> could anyone provide further assistance -seems this is a very old thread-? >> I want a mobile number only as answer >> type= text name= mobile number label=Mobile Number required=yes >> constraint_message=10 digit number! appearance=numbers >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com >

Hi Yaw,

Thanks for the speedy response. I made the change, and unfortunately, now
it doesn't seem to restrict the number of digits on input.

Here is the constraint I used, in xls forms. Can you please confirm that I
have the correct formatting?

regex(.,'[A-Za-z0-9]{2}')

Thanks so much.

Best,
Audrey

··· On Wed, Jan 30, 2013 at 9:31 PM, Yaw Anokwa wrote:

The example I used was just uppercase. Try [A-Za-z0-9]{4} if you want
to include lower case.

On Wed, Jan 30, 2013 at 10:28 AM, audrey.henkels@gmail.com wrote:

Hi Yaw,

I have a question about the regex constraint you mention below. I tested
this out (as a constraint in xls forms) and found that it restricts the
number of digits correctly but only allows input that begins with
letters.
I'd like to be able to restrict to alphanumeric input, regardless of
whether
it begins with numbers or letters. Is this possible? Can you please
advise
as to the constraint that would accomplish that.

Thanks so much for your help.

Best,
Audrey

On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote:

Michael

Both of these are somewhat advanced operations.

For the first, you need to add something like this for the prompt
label. So if you wanted to ask someone their age, you'd put this:
"Hello, . What is your age?"

For the second, you need a regular expression constraint (read
http://www.regular-expressions.info/ for more). For example, this
constraint will allow only alphanumeric input that is 4 characters
long.
regex(.,'[A-Z0-9]{4}')

Hope this helps,

Yaw

On Fri, Sep 14, 2012 at 10:21 AM, m_optimal mmana...@optimalsolutionsgroup.com wrote:

Hi ODK Community,

I'd like to know if there is an xls syntax for piping the respondent's
Name
(ex. Matt), such that when the next question comes up (ex. What is
[NAME's]
gender?), the [NAME's] automatically changes to the respondent's
actual

Name
(ex. What is Matt's gender?).

Secondly, I need some help with constraining the phone number such
that

the
enumerator is required to entering a phone number that is between 7-10
characters (integers) long, with the country code as the required
integers
for the first three characters. Is there a way to accomplish that in
xls?

Thank you for the help!

Michael

--
Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Dear Yaw and Mitch,

similar with the previous questions about inputting number, is there any
way to have number field automatically separated by comma or dot (like in
MS Excel)?
With the default, there are many errors in typing number, especially the
long one. For example, to input 100 million then we have this format by
default: 100000000.

It is easy if the field automatically converts the input into 100,000,000.

Thanks in advance

Andre

··· > >> >> >> >> >

First, make the question required. Second, add the start/end
characters (^ and $)

Final XML should look like...

··· On Wed, Jan 30, 2013 at 11:09 AM, Audrey Henkels wrote: > Hi Yaw, > > Thanks for the speedy response. I made the change, and unfortunately, now it > doesn't seem to restrict the number of digits on input. > > Here is the constraint I used, in xls forms. Can you please confirm that I > have the correct formatting? > > regex(.,'[A-Za-z0-9]{2}') > > Thanks so much. > > Best, > Audrey > > > On Wed, Jan 30, 2013 at 9:31 PM, Yaw Anokwa wrote: >> >> The example I used was just uppercase. Try [A-Za-z0-9]{4} if you want >> to include lower case. >> >> On Wed, Jan 30, 2013 at 10:28 AM, wrote: >> > Hi Yaw, >> > >> > I have a question about the regex constraint you mention below. I tested >> > this out (as a constraint in xls forms) and found that it restricts the >> > number of digits correctly but only allows input that begins with >> > letters. >> > I'd like to be able to restrict to alphanumeric input, regardless of >> > whether >> > it begins with numbers or letters. Is this possible? Can you please >> > advise >> > as to the constraint that would accomplish that. >> > >> > Thanks so much for your help. >> > >> > Best, >> > Audrey >> > >> > >> > On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote: >> >> >> >> Michael >> >> >> >> Both of these are somewhat advanced operations. >> >> >> >> For the first, you need to add something like this for the prompt >> >> label. So if you wanted to ask someone their age, you'd put this: >> >> "Hello, . What is your age?" >> >> >> >> For the second, you need a regular expression constraint (read >> >> http://www.regular-expressions.info/ for more). For example, this >> >> constraint will allow only alphanumeric input that is 4 characters >> >> long. >> >> regex(.,'[A-Z0-9]{4}') >> >> >> >> Hope this helps, >> >> >> >> Yaw >> >> >> >> >> >> On Fri, Sep 14, 2012 at 10:21 AM, m_optimal wrote: >> >> > Hi ODK Community, >> >> > >> >> > I'd like to know if there is an xls syntax for piping the >> >> > respondent's >> >> > Name >> >> > (ex. Matt), such that when the next question comes up (ex. What is >> >> > [NAME's] >> >> > gender?), the [NAME's] automatically changes to the respondent's >> >> > actual >> >> > Name >> >> > (ex. What is Matt's gender?). >> >> > >> >> > Secondly, I need some help with constraining the phone number such >> >> > that >> >> > the >> >> > enumerator is required to entering a phone number that is between >> >> > 7-10 >> >> > characters (integers) long, with the country code as the required >> >> > integers >> >> > for the first three characters. Is there a way to accomplish that in >> >> > xls? >> >> > >> >> > Thank you for the help! >> >> > >> >> > Michael >> >> > >> >> > -- >> >> > Post: opend...@googlegroups.com >> >> > Unsubscribe: opendatakit...@googlegroups.com >> >> > Options: http://groups.google.com/group/opendatakit?hl=en >> > >> > -- >> > -- >> > Post: opendatakit@googlegroups.com >> > Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> > Options: http://groups.google.com/group/opendatakit?hl=en >> > >> > --- >> > You received this message because you are subscribed to the Google >> > Groups >> > "ODK Community" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> > an >> > email to opendatakit+unsubscribe@googlegroups.com. >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >> -- >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit+unsubscribe@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >

Works perfectly now. Thanks for the help!

Best,
Audrey

··· On Wed, Jan 30, 2013 at 10:53 PM, Yaw Anokwa wrote:

First, make the question required. Second, add the start/end
characters (^ and $)

Final XML should look like...

On Wed, Jan 30, 2013 at 11:09 AM, Audrey Henkels audrey.henkels@gmail.com wrote:

Hi Yaw,

Thanks for the speedy response. I made the change, and unfortunately,
now it
doesn't seem to restrict the number of digits on input.

Here is the constraint I used, in xls forms. Can you please confirm that
I
have the correct formatting?

regex(.,'[A-Za-z0-9]{2}')

Thanks so much.

Best,
Audrey

On Wed, Jan 30, 2013 at 9:31 PM, Yaw Anokwa yanokwa@nafundi.com wrote:

The example I used was just uppercase. Try [A-Za-z0-9]{4} if you want
to include lower case.

On Wed, Jan 30, 2013 at 10:28 AM, audrey.henkels@gmail.com wrote:

Hi Yaw,

I have a question about the regex constraint you mention below. I
tested

this out (as a constraint in xls forms) and found that it restricts
the

number of digits correctly but only allows input that begins with
letters.
I'd like to be able to restrict to alphanumeric input, regardless of
whether
it begins with numbers or letters. Is this possible? Can you please
advise
as to the constraint that would accomplish that.

Thanks so much for your help.

Best,
Audrey

On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote:

Michael

Both of these are somewhat advanced operations.

For the first, you need to add something like this for the prompt
label. So if you wanted to ask someone their age, you'd put this:
"Hello, . What is your age?"

For the second, you need a regular expression constraint (read
http://www.regular-expressions.info/ for more). For example, this
constraint will allow only alphanumeric input that is 4 characters
long.
regex(.,'[A-Z0-9]{4}')

Hope this helps,

Yaw

On Fri, Sep 14, 2012 at 10:21 AM, m_optimal mmana...@optimalsolutionsgroup.com wrote:

Hi ODK Community,

I'd like to know if there is an xls syntax for piping the
respondent's
Name
(ex. Matt), such that when the next question comes up (ex. What is
[NAME's]
gender?), the [NAME's] automatically changes to the respondent's
actual
Name
(ex. What is Matt's gender?).

Secondly, I need some help with constraining the phone number such
that
the
enumerator is required to entering a phone number that is between
7-10
characters (integers) long, with the country code as the required
integers
for the first three characters. Is there a way to accomplish that
in

xls?

Thank you for the help!

Michael

--
Post: opend...@googlegroups.com
Unsubscribe: opendatakit...@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google
Groups

"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send
an

email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No. Would require changing the code.

··· On Tue, Feb 16, 2016 at 5:53 PM, wrote:

Dear Yaw and Mitch,

similar with the previous questions about inputting number, is there any
way to have number field automatically separated by comma or dot (like in
MS Excel)?
With the default, there are many errors in typing number, especially the
long one. For example, to input 100 million then we have this format by
default: 100000000.

It is easy if the field automatically converts the input into 100,000,000.

Thanks in advance

Andre

http://groups.google.com/group/opendatakit?hl=en

https://groups.google.com/d/optout
http://groups.google.com/group/opendatakit?hl=en
https://groups.google.com/d/optout

--
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Hi Yaw and Mitch,

I'm trying to constraints on the length of an integer field and
both regex(.,'[A-Za-z0-9]{4}') and regex(.,'^[A-Za-z0-9]{4}$'), allow
inputs more than 4 digits. Can you please let me know how I can restrict
the length to exactly 4 digits?

Thanks,
Pratibha

··· On Thursday, January 31, 2013 1:38:47 AM UTC+5:30, Audrey Henkels wrote: > > Works perfectly now. Thanks for the help! > > Best, > Audrey > > On Wed, Jan 30, 2013 at 10:53 PM, Yaw Anokwa <yan...@nafundi.com wrote: > >> First, make the question required. Second, add the start/end >> characters (^ and $) >> >> Final XML should look like... >> >> >> On Wed, Jan 30, 2013 at 11:09 AM, Audrey Henkels <audrey....@gmail.com > wrote: >> > Hi Yaw, >> > >> > Thanks for the speedy response. I made the change, and unfortunately, >> now it >> > doesn't seem to restrict the number of digits on input. >> > >> > Here is the constraint I used, in xls forms. Can you please confirm >> that I >> > have the correct formatting? >> > >> > regex(.,'[A-Za-z0-9]{2}') >> > >> > Thanks so much. >> > >> > Best, >> > Audrey >> > >> > >> > On Wed, Jan 30, 2013 at 9:31 PM, Yaw Anokwa <yan...@nafundi.com> wrote: >> >> >> >> The example I used was just uppercase. Try [A-Za-z0-9]{4} if you want >> >> to include lower case. >> >> >> >> On Wed, Jan 30, 2013 at 10:28 AM, <audrey....@gmail.com > wrote: >> >> > Hi Yaw, >> >> > >> >> > I have a question about the regex constraint you mention below. I >> tested >> >> > this out (as a constraint in xls forms) and found that it restricts >> the >> >> > number of digits correctly but only allows input that begins with >> >> > letters. >> >> > I'd like to be able to restrict to alphanumeric input, regardless of >> >> > whether >> >> > it begins with numbers or letters. Is this possible? Can you please >> >> > advise >> >> > as to the constraint that would accomplish that. >> >> > >> >> > Thanks so much for your help. >> >> > >> >> > Best, >> >> > Audrey >> >> > >> >> > >> >> > On Friday, September 14, 2012 5:31:21 PM UTC+3, Yaw Anokwa wrote: >> >> >> >> >> >> Michael >> >> >> >> >> >> Both of these are somewhat advanced operations. >> >> >> >> >> >> For the first, you need to add something like this for the prompt >> >> >> label. So if you wanted to ask someone their age, you'd put this: >> >> >> "Hello, . What is your age?" >> >> >> >> >> >> For the second, you need a regular expression constraint (read >> >> >> http://www.regular-expressions.info/ for more). For example, this >> >> >> constraint will allow only alphanumeric input that is 4 characters >> >> >> long. >> >> >> regex(.,'[A-Z0-9]{4}') >> >> >> >> >> >> Hope this helps, >> >> >> >> >> >> Yaw >> >> >> >> >> >> >> >> >> On Fri, Sep 14, 2012 at 10:21 AM, m_optimal wrote: >> >> >> > Hi ODK Community, >> >> >> > >> >> >> > I'd like to know if there is an xls syntax for piping the >> >> >> > respondent's >> >> >> > Name >> >> >> > (ex. Matt), such that when the next question comes up (ex. What is >> >> >> > [NAME's] >> >> >> > gender?), the [NAME's] automatically changes to the respondent's >> >> >> > actual >> >> >> > Name >> >> >> > (ex. What is Matt's gender?). >> >> >> > >> >> >> > Secondly, I need some help with constraining the phone number such >> >> >> > that >> >> >> > the >> >> >> > enumerator is required to entering a phone number that is between >> >> >> > 7-10 >> >> >> > characters (integers) long, with the country code as the required >> >> >> > integers >> >> >> > for the first three characters. Is there a way to accomplish that >> in >> >> >> > xls? >> >> >> > >> >> >> > Thank you for the help! >> >> >> > >> >> >> > Michael >> >> >> > >> >> >> > -- >> >> >> > Post: opend...@googlegroups.com >> >> >> > Unsubscribe: opendatakit...@googlegroups.com >> >> >> > Options: http://groups.google.com/group/opendatakit?hl=en >> >> > >> >> > -- >> >> > -- >> >> > Post: opend...@googlegroups.com >> >> > Unsubscribe: opendatakit...@googlegroups.com >> >> > Options: http://groups.google.com/group/opendatakit?hl=en >> >> > >> >> > --- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "ODK Community" group. >> >> > To unsubscribe from this group and stop receiving emails from it, >> send >> >> > an >> >> > email to opendatakit...@googlegroups.com . >> >> > For more options, visit https://groups.google.com/groups/opt_out. >> >> > >> >> > >> >> >> >> -- >> >> -- >> >> Post: opend...@googlegroups.com >> >> Unsubscribe: opendatakit...@googlegroups.com >> >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> >> >> --- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "ODK Community" group. >> >> To unsubscribe from this group and stop receiving emails from it, send >> an >> >> email to opendatakit...@googlegroups.com . >> >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >> >> > >> > -- >> > -- >> > Post: opend...@googlegroups.com >> > Unsubscribe: opendatakit...@googlegroups.com >> > Options: http://groups.google.com/group/opendatakit?hl=en >> > >> > --- >> > You received this message because you are subscribed to the Google >> Groups >> > "ODK Community" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an >> > email to opendatakit...@googlegroups.com . >> > For more options, visit https://groups.google.com/groups/opt_out. >> > >> > >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >> --- >> You received this message because you are subscribed to the Google Groups >> "ODK Community" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to opendatakit...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> >

Andre,

The alternative is to use the text data type with appearance=numbers.
It won't save the value as a number, but I think that'll let you enter
commas.

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Thu, Feb 18, 2016 at 12:57 AM, Mitch Sundt mitchellsundt@gmail.com wrote:

No. Would require changing the code.

On Tue, Feb 16, 2016 at 5:53 PM, survalgds@gmail.com wrote:

Dear Yaw and Mitch,

similar with the previous questions about inputting number, is there any
way to have number field automatically separated by comma or dot (like in MS
Excel)?
With the default, there are many errors in typing number, especially the
long one. For example, to input 100 million then we have this format by
default: 100000000.

It is easy if the field automatically converts the input into 100,000,000.

Thanks in advance

Andre

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.