Set Limit On Integer

How Can i set limit on integer?
i want to set only 11digit for phone numbers
(not more than 11, not less than 11)

1 Like

On integer, the string-length(.)=9, for any number greater than 9 make it a*
text field *and on appearance write numbers

ยทยทยท On Wednesday, May 25, 2016 at 9:14:20 AM UTC+3, Mostafijur Rahaman Parvez wrote: > > How Can i set limit on integer? > i want to set only 11digit for phone numbers > (not more than 11, not less than 11) >
1 Like

Did the first comment help? I'm not sure I understand what Cyrus was
saying. I also have the same problem - I want to have a specific number of
digits for a phone number.

ยทยทยท On Wednesday, May 25, 2016 at 2:14:20 AM UTC-4, Mostafijur Rahaman Parvez wrote: > > How Can i set limit on integer? > i want to set only 11digit for phone numbers > (not more than 11, not less than 11) >

Do this;

  1. Make sure the type of your question is text
  2. In the constraints column for this question, use the regex() like
    this: regex(.,'[0-9]{11}'). This means you are only accepting
    characters 0-9 and you are limiting them to EXACTLY 11 characters/digits.

It will work.

Allan

ยทยทยท On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: > > How Can i set limit on integer? > i want to set only 11digit for phone numbers > (not more than 11, not less than 11) >
3 Likes

phone numbers are best stored as string values (text fields), and with the
"numbers" appearance.

Then you can apply a regex and/or string length constraint on the values
that are entered.

ยทยทยท On Wed, May 25, 2016 at 5:52 AM, Amanda Berman wrote:

Did the first comment help? I'm not sure I understand what Cyrus was
saying. I also have the same problem - I want to have a specific number of
digits for a phone number.

On Wednesday, May 25, 2016 at 2:14:20 AM UTC-4, Mostafijur Rahaman Parvez wrote:

How Can i set limit on integer?
i want to set only 11digit for phone numbers
(not more than 11, not less than 11)

--

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

Nope, I can't find solution.

ยทยทยท On Wednesday, May 25, 2016 at 6:52:55 PM UTC+6, Amanda Berman wrote: > > Did the first comment help? I'm not sure I understand what Cyrus was > saying. I also have the same problem - I want to have a specific number of > digits for a phone number. > > On Wednesday, May 25, 2016 at 2:14:20 AM UTC-4, Mostafijur Rahaman Parvez wrote: >> >> How Can i set limit on integer? >> i want to set only 11digit for phone numbers >> (not more than 11, not less than 11) >> >

Thank you soo much

ยทยทยท On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote: > > Do this; > > 1. Make sure the type of your question is *text* > 2. In the constraints column for this question, use the regex() like > this: *regex(.,'[0-9]{11}')*. This means you are only accepting > characters 0-9 and you are limiting them to EXACTLY 11 characters/digits. > > It will work. > > Allan > > On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: >> >> How Can i set limit on integer? >> i want to set only 11digit for phone numbers >> (not more than 11, not less than 11) >> >

Hi Allan, How can i set only text input, which accept only text(no number
0-9) , please help me

ยทยทยท On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote: > > Do this; > > 1. Make sure the type of your question is *text* > 2. In the constraints column for this question, use the regex() like > this: *regex(.,'[0-9]{11}')*. This means you are only accepting > characters 0-9 and you are limiting them to EXACTLY 11 characters/digits. > > It will work. > > Allan > > On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: >> >> How Can i set limit on integer? >> i want to set only 11digit for phone numbers >> (not more than 11, not less than 11) >> >

Thank you

ยทยทยท On Wednesday, May 25, 2016 at 10:40:09 PM UTC+6, Mitch Sundt wrote: > > phone numbers are best stored as string values (text fields), and with the > "numbers" appearance. > > Then you can apply a regex and/or string length constraint on the values > that are entered. > > On Wed, May 25, 2016 at 5:52 AM, Amanda Berman <amanda....@gmail.com > wrote: > >> Did the first comment help? I'm not sure I understand what Cyrus was >> saying. I also have the same problem - I want to have a specific number of >> digits for a phone number. >> >> >> On Wednesday, May 25, 2016 at 2:14:20 AM UTC-4, Mostafijur Rahaman Parvez wrote: >>> >>> How Can i set limit on integer? >>> i want to set only 11digit for phone numbers >>> (not more than 11, not less than 11) >>> >> -- >> -- >> 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 >

How Can I Do it from Text Field? Please give ma an example of length
Constraint....

ยทยทยท On Wednesday, May 25, 2016 at 10:40:09 PM UTC+6, Mitch Sundt wrote: > > phone numbers are best stored as string values (text fields), and with the > "numbers" appearance. > > Then you can apply a regex and/or string length constraint on the values > that are entered. > > On Wed, May 25, 2016 at 5:52 AM, Amanda Berman <amanda....@gmail.com > wrote: > >> Did the first comment help? I'm not sure I understand what Cyrus was >> saying. I also have the same problem - I want to have a specific number of >> digits for a phone number. >> >> >> On Wednesday, May 25, 2016 at 2:14:20 AM UTC-4, Mostafijur Rahaman Parvez wrote: >>> >>> How Can i set limit on integer? >>> i want to set only 11digit for phone numbers >>> (not more than 11, not less than 11) >>> >> -- >> -- >> 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 >

Sorry for replying late, this is what you must do;

Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in lowercase
and uppercase. [a-zA-Z]+ matches one or more letters and ^[a-zA-Z]+$ matches
only strings that consist of one or more letters only (^ and $ mark the
begin and end of a string respectively).

source: http://stackoverflow.com/questions/3617797/regex-to-match-only-letters

Allan

ยทยทยท On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote: > > Hi Allan, How can i set only text input, which accept only text(no number > 0-9) , please help me > > > On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote: >> >> Do this; >> >> 1. Make sure the type of your question is *text* >> 2. In the constraints column for this question, use the regex() like >> this: *regex(.,'[0-9]{11}')*. This means you are only accepting >> characters 0-9 and you are limiting them to EXACTLY 11 characters/digits. >> >> It will work. >> >> Allan >> >> On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: >>> >>> How Can i set limit on integer? >>> i want to set only 11digit for phone numbers >>> (not more than 11, not less than 11) >>> >>
1 Like

Thanks Allan for your response,

i used *regex(.,'[^0-9]') * in constraint, that ^ means it's
only ignore *0-9 *so it works properly, i think its much easier than [a-zA-Z]+
. Thanks for your help.

ยทยทยท On Sunday, July 24, 2016 at 2:54:12 AM UTC+6, Allan Nila Chongwe wrote: > > Sorry for replying late, this is what you must do; > > Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in lowercase > and uppercase. [a-zA-Z]+ matches one or more letters and ^[a-zA-Z]+$ matches > only strings that consist of one or more letters only (^ and $ mark the > begin and end of a string respectively). > > source: > http://stackoverflow.com/questions/3617797/regex-to-match-only-letters > > Allan > > On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote: >> >> Hi Allan, How can i set only text input, which accept only text(no number >> 0-9) , please help me >> >> >> On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote: >>> >>> Do this; >>> >>> 1. Make sure the type of your question is *text* >>> 2. In the constraints column for this question, use the regex() like >>> this: *regex(.,'[0-9]{11}')*. This means you are only accepting >>> characters 0-9 and you are limiting them to EXACTLY 11 characters/digits. >>> >>> It will work. >>> >>> Allan >>> >>> On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: >>>> >>>> How Can i set limit on integer? >>>> i want to set only 11digit for phone numbers >>>> (not more than 11, not less than 11) >>>> >>>

Alright and thank you for sharing your solution as well.

ยทยทยท On 24 Jul 2016 07:14, "Mostafijur Rahaman Parvez" wrote:

Thanks Allan for your response,

i used *regex(.,'[^0-9]') * in constraint, that ^ means
it's only ignore *0-9 *so it works properly, i think its much easier than [a-zA-Z]+
. Thanks for your help.

On Sunday, July 24, 2016 at 2:54:12 AM UTC+6, Allan Nila Chongwe wrote:

Sorry for replying late, this is what you must do;

Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in
lowercase and uppercase. [a-zA-Z]+ matches one or more letters and
^[a-zA-Z]+$ matches only strings that consist of one or more letters
only (^ and $ mark the begin and end of a string respectively).

source:
http://stackoverflow.com/questions/3617797/regex-to-match-only-letters

Allan

On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote:

Hi Allan, How can i set only text input, which accept only text(no
number 0-9) , please help me

On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote:

Do this;

  1. Make sure the type of your question is text
  2. In the constraints column for this question, use the regex()
    like this: regex(.,'[0-9]{11}'). This means you are only
    accepting characters 0-9 and you are limiting them to EXACTLY 11
    characters/digits.

It will work.

Allan

On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote:

How Can i set limit on integer?
i want to set only 11digit for phone numbers
(not more than 11, not less than 11)

--
--
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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

How can i use integer value for skip question or link question???

ยทยทยท On Sun, Jul 24, 2016 at 3:55 PM, Allan Chongwe wrote:

Alright and thank you for sharing your solution as well.

On 24 Jul 2016 07:14, "Mostafijur Rahaman Parvez" parvezhasan.m@gmail.com wrote:

Thanks Allan for your response,

i used *regex(.,'[^0-9]') * in constraint, that ^ means
it's only ignore *0-9 *so it works properly, i think its much easier
than [a-zA-Z]+ . Thanks for your help.

On Sunday, July 24, 2016 at 2:54:12 AM UTC+6, Allan Nila Chongwe wrote:

Sorry for replying late, this is what you must do;

Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in
lowercase and uppercase. [a-zA-Z]+ matches one or more letters and
^[a-zA-Z]+$ matches only strings that consist of one or more letters
only (^ and $ mark the begin and end of a string respectively).

source:
http://stackoverflow.com/questions/3617797/regex-to-match-only-letters

Allan

On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote:

Hi Allan, How can i set only text input, which accept only text(no
number 0-9) , please help me

On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote:

Do this;

  1. Make sure the type of your question is text
  2. In the constraints column for this question, use the regex()
    like this: regex(.,'[0-9]{11}'). This means you are only
    accepting characters 0-9 and you are limiting them to EXACTLY 11
    characters/digits.

It will work.

Allan

On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote:

How Can i set limit on integer?
i want to set only 11digit for phone numbers
(not more than 11, not less than 11)

--
--
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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe.
To unsubscribe from this group and all its topics, 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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mostafijur,

If you need to skip, use relevance (http://xlsform.org/#relevant)

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 Mon, Jul 25, 2016 at 7:05 AM, Mostafijur Rahaman Parvez parvezhasan.m@gmail.com wrote:

How can i use integer value for skip question or link question???

On Sun, Jul 24, 2016 at 3:55 PM, Allan Chongwe allanchongwe@gmail.com wrote:

Alright and thank you for sharing your solution as well.

On 24 Jul 2016 07:14, "Mostafijur Rahaman Parvez" parvezhasan.m@gmail.com wrote:

Thanks Allan for your response,

i used regex(.,'[^0-9]') in constraint, that ^ means it's
only ignore 0-9 so it works properly, i think its much easier than [a-zA-Z]+
. Thanks for your help.

On Sunday, July 24, 2016 at 2:54:12 AM UTC+6, Allan Nila Chongwe wrote:

Sorry for replying late, this is what you must do;

Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in
lowercase and uppercase. [a-zA-Z]+ matches one or more letters and
^[a-zA-Z]+$ matches only strings that consist of one or more letters only (^
and $ mark the begin and end of a string respectively).

source:
http://stackoverflow.com/questions/3617797/regex-to-match-only-letters

Allan

On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote:

Hi Allan, How can i set only text input, which accept only text(no
number 0-9) , please help me

On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote:

Do this;

Make sure the type of your question is text
In the constraints column for this question, use the regex() like
this: regex(.,'[0-9]{11}'). This means you are only accepting characters 0-9
and you are limiting them to EXACTLY 11 characters/digits.

It will work.

Allan

On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote:

How Can i set limit on integer?
i want to set only 11digit for phone numbers
(not more than 11, not less than 11)

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe.
To unsubscribe from this group and all its topics, 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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe.
To unsubscribe from this group and all its topics, 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.

This syntax works well for me when placed under the constraint column ,
data type = "text"

regex(.,'^[:digit:]{10}$')

ยทยทยท On Thursday, August 11, 2016 at 5:40:20 PM UTC+2, Yaw Anokwa wrote: > > Mostafijur, > > If you need to skip, use relevance (http://xlsform.org/#relevant) > > 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 Mon, Jul 25, 2016 at 7:05 AM, Mostafijur Rahaman Parvez <parvez...@gmail.com > wrote: > > How can i use integer value for skip question or link question??? > > > > On Sun, Jul 24, 2016 at 3:55 PM, Allan Chongwe <allanc...@gmail.com > wrote: > >> > >> Alright and thank you for sharing your solution as well. > >> > >> > >> On 24 Jul 2016 07:14, "Mostafijur Rahaman Parvez" <parvez...@gmail.com > wrote: > >>> > >>> Thanks Allan for your response, > >>> > >>> i used regex(.,'[^0-9]') in constraint, that ^ means it's > >>> only ignore 0-9 so it works properly, i think its much easier than > [a-zA-Z]+ > >>> . Thanks for your help. > >>> > >>> On Sunday, July 24, 2016 at 2:54:12 AM UTC+6, Allan Nila Chongwe wrote: > >>>> > >>>> Sorry for replying late, this is what you must do; > >>>> > >>>> Use the regex function: [a-zA-Z] matches one letter from Aโ€“Z in > >>>> lowercase and uppercase. [a-zA-Z]+ matches one or more letters and > >>>> ^[a-zA-Z]+$ matches only strings that consist of one or more letters > only (^ > >>>> and $ mark the begin and end of a string respectively). > >>>> > >>>> source: > >>>> > http://stackoverflow.com/questions/3617797/regex-to-match-only-letters > >>>> > >>>> Allan > >>>> > >>>> On Saturday, July 23, 2016 at 6:52:51 AM UTC+2, Mostafijur Rahaman Parvez wrote: > >>>>> > >>>>> Hi Allan, How can i set only text input, which accept only text(no > >>>>> number 0-9) , please help me > >>>>> > >>>>> > >>>>> On Wednesday, June 1, 2016 at 4:59:34 PM UTC+6, Allan Nila Chongwe wrote: > >>>>>> > >>>>>> Do this; > >>>>>> > >>>>>> Make sure the type of your question is text > >>>>>> In the constraints column for this question, use the regex() like > >>>>>> this: regex(.,'[0-9]{11}'). This means you are only accepting > characters 0-9 > >>>>>> and you are limiting them to EXACTLY 11 characters/digits. > >>>>>> > >>>>>> It will work. > >>>>>> > >>>>>> Allan > >>>>>> > >>>>>> On Wednesday, May 25, 2016 at 8:14:20 AM UTC+2, Mostafijur Rahaman Parvez wrote: > >>>>>>> > >>>>>>> How Can i set limit on integer? > >>>>>>> i want to set only 11digit for phone numbers > >>>>>>> (not more than 11, not less than 11) > >>> > >>> -- > >>> -- > >>> 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 a topic in the > >>> Google Groups "ODK Community" group. > >>> To unsubscribe from this topic, visit > >>> https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe. > > >>> To unsubscribe from this group and all its topics, send an email to > >>> opendatakit...@googlegroups.com . > >>> For more options, visit https://groups.google.com/d/optout. > >> > >> -- > >> -- > >> 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 a topic in the > >> Google Groups "ODK Community" group. > >> To unsubscribe from this topic, visit > >> https://groups.google.com/d/topic/opendatakit/O_f_acNpzPU/unsubscribe. > >> To unsubscribe from this group and all its topics, send an email to > >> opendatakit...@googlegroups.com . > >> For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > -- > > 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. >
  • set the appearance to number, because the default key board will open up with text keys and user can put text data. number appearance helps to prevent text values.

Many thanks Allan. Could you tell me where I can get such formula for further learning?
Thanks in advance.

Hi @saifulhasan, if you're asking about regex, the ODK docs have a section on Using regular expressions that includes links and ODK specific notes. Feel free to open a new Support topic if you have specific issues implementing regex in a survey!

1 Like

A post was split to a new topic: Regex for numbers