How to use Uppercase text only in ODK

Dear Community,

I am the beginner in ODK environment and I am developing a database to
collect information in health area.
My question is: How can I only allow to include uppercase only in text type
to avoid case sensitivity during data collection? For example, in the name
of the facility, name of the patient, etc.

I am looking forward to hear from you.
Best regards,
Antonio.

Hi Antonio,
Answer must beuppercase letters and between 1 and 10 characters long for
example
constraint= regex(., "^[A-Z]{1,15}$")

http://opendatakit.org/help/form-design/binding/

··· Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : > > Dear Community, > > I am the beginner in ODK environment and I am developing a database to > collect information in health area. > My question is: How can I only allow to include uppercase only in text > type to avoid case sensitivity during data collection? For example, in the > name of the facility, name of the patient, etc. > > I am looking forward to hear from you. > Best regards, > Antonio. >
2 Likes

Dear Community,

I am looking for the string function which can convert a lowercase to
uppercase in XML Form?
I tried this function :"upper-case()" but did not working.

Thanks in advance.
Regards,
Karim

Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : > Dear
Community, > > I am the beginner in ODK environment and I am developing a
database to collect information in health area. > My question is: How can I
only allow to include uppercase only in text type to avoid case sensitivity
during data collection? For example, in the name of the facility, name of
the patient, etc. > > I am looking forward to hear from you. > Best
regards, > Antonio.

Hi Mokpokpok,

Thank you for your reply.
I forgot to say that I am using XLSForm. Therefore, I have included the
code you sent but it does not give any effect.
Is that code suit for XLSForm environment?

Best regards,
Antonio.

··· On Thursday, July 17, 2014 11:45:06 AM UTC+2, Mokpokpo ADJEODA wrote: > > Hi Antonio, > Answer must beuppercase letters and between 1 and 10 characters long for > example > constraint= regex(., "^[A-Z]{1,15}$") > > http://opendatakit.org/help/form-design/binding/ > > Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : >> >> Dear Community, >> >> I am the beginner in ODK environment and I am developing a database to >> collect information in health area. >> My question is: How can I only allow to include uppercase only in text >> type to avoid case sensitivity during data collection? For example, in the >> name of the facility, name of the patient, etc. >> >> I am looking forward to hear from you. >> Best regards, >> Antonio. >> >

Hi Karim,

As the previous messages in the thread describe, you can prevent users
from entering text in a particular case, but transforms after the fact
aren't currently supported. Maybe they should be, so let's talk about
it.

Is there a reason you can't do this at the entry point or downstream
(e.g., during reporting)? Or put another way, why do you need this
feature in the XForm?

Thanks,

Yaw

··· On Mon, May 22, 2017 at 1:13 PM, Karim Derra wrote: > Dear Community, > > I am looking for the string function which can convert a lowercase to > uppercase in XML Form? > I tried this function :"upper-case()" but did not working. > > Thanks in advance. > Regards, > Karim > > > > > Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : > Dear > Community, > > I am the beginner in ODK environment and I am developing a > database to collect information in health area. > My question is: How can I > only allow to include uppercase only in text type to avoid case sensitivity > during data collection? For example, in the name of the facility, name of > the patient, etc. > > I am looking forward to hear from you. > Best regards, >> Antonio. > > -- > -- > 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.

Hi Antonio,

type name label constraint text hh1 Your name regex(., "^[A-Z]{1,15}$")

··· Le jeudi 17 juillet 2014 10:17:42 UTC, Antonio Niquisse a écrit : > > Hi Mokpokpok, > > Thank you for your reply. > I forgot to say that I am using XLSForm. Therefore, I have included the > code you sent but it does not give any effect. > Is that code suit for XLSForm environment? > > Best regards, > Antonio. > > On Thursday, July 17, 2014 11:45:06 AM UTC+2, Mokpokpo ADJEODA wrote: >> >> Hi Antonio, >> Answer must beuppercase letters and between 1 and 10 characters long for >> example >> constraint= regex(., "^[A-Z]{1,15}$") >> >> http://opendatakit.org/help/form-design/binding/ >> >> Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : >>> >>> Dear Community, >>> >>> I am the beginner in ODK environment and I am developing a database to >>> collect information in health area. >>> My question is: How can I only allow to include uppercase only in text >>> type to avoid case sensitivity during data collection? For example, in the >>> name of the facility, name of the patient, etc. >>> >>> I am looking forward to hear from you. >>> Best regards, >>> Antonio. >>> >>
1 Like

Thanks Yaw,
I make a pull data in the form with cascading selct. One of the key
variable is a composite ID which is initialy in upper case. e.g id=RE067.
When I want to keep the 2first two letters of the id variable, I got "re"
and not "RE".
I used this function :
substr(${id},0,2)

regards,
Karim

··· 2017-05-25 15:08 GMT+00:00 Yaw Anokwa :

Hi Karim,

As the previous messages in the thread describe, you can prevent users
from entering text in a particular case, but transforms after the fact
aren't currently supported. Maybe they should be, so let's talk about
it.

Is there a reason you can't do this at the entry point or downstream
(e.g., during reporting)? Or put another way, why do you need this
feature in the XForm?

Thanks,

Yaw

On Mon, May 22, 2017 at 1:13 PM, Karim Derra kderra@gmail.com wrote:

Dear Community,

I am looking for the string function which can convert a lowercase to
uppercase in XML Form?
I tried this function :"upper-case()" but did not working.

Thanks in advance.
Regards,
Karim

Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : > Dear
Community, > > I am the beginner in ODK environment and I am developing a
database to collect information in health area. > My question is: How
can I
only allow to include uppercase only in text type to avoid case
sensitivity
during data collection? For example, in the name of the facility, name of
the patient, etc. > > I am looking forward to hear from you. > Best
regards,

Antonio.

--

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

The challenge with this approach is that although the user will not be able to proceed if he/she has entered lower case text they will still be able to insert lower case text and they will have to explicitly select uppercase letters while typing. This may be inhibitive or counterproductive.

Why not convert to upper case text post data capture if you require it to be uppercase.

Bashir

··· From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com] On Behalf Of Mokpokpo ADJEODA Sent: 17 July 2014 03:36 PM To: opendatakit@googlegroups.com Subject: [ODK Community] Re: How to use Uppercase text only in ODK

Hi Antonio,

type

name

label

constraint

text

hh1

Your name

regex(., "^[A-Z]{1,15}$")

Le jeudi 17 juillet 2014 10:17:42 UTC, Antonio Niquisse a écrit :

Hi Mokpokpok,

Thank you for your reply.
I forgot to say that I am using XLSForm. Therefore, I have included the code you sent but it does not give any effect.
Is that code suit for XLSForm environment?

Best regards,
Antonio.

On Thursday, July 17, 2014 11:45:06 AM UTC+2, Mokpokpo ADJEODA wrote:

Hi Antonio,

Answer must beuppercase letters and between 1 and 10 characters long for example

constraint= regex(., "^[A-Z]{1,15}$")

http://opendatakit.org/help/form-design/binding/

Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit :

Dear Community,

I am the beginner in ODK environment and I am developing a database to collect information in health area.
My question is: How can I only allow to include uppercase only in text type to avoid case sensitivity during data collection? For example, in the name of the facility, name of the patient, etc.

I am looking forward to hear from you.
Best regards,
Antonio.

--

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 email is free from viruses and malware because avast! Antivirus protection is active.

1 Like

Hi Karim,

This sounds like a bug with JavaRosa. I've filed it at
https://github.com/opendatakit/javarosa/issues/59.

What would really help is if you could upload a very small test form
to https://github.com/opendatakit/javarosa/issues/59 so a volunteer
could try to reproduce this bug. Please also note the version of ODK
Collect you are using so we can be precise with our testing.

If we can reproduce it, we'll try to fix it in the next release
(probably a month from now).

Thanks,

Yaw

··· On Wed, May 31, 2017 at 1:28 AM, Karim Derra wrote: > > Thanks Yaw, > I make a pull data in the form with cascading selct. One of the key variable is a composite ID which is initialy in upper case. e.g id=RE067. > When I want to keep the 2first two letters of the id variable, I got "re" and not "RE". > I used this function : > substr(${id},0,2) > > regards, > Karim > > > 2017-05-25 15:08 GMT+00:00 Yaw Anokwa : >> >> Hi Karim, >> >> As the previous messages in the thread describe, you can prevent users >> from entering text in a particular case, but transforms after the fact >> aren't currently supported. Maybe they should be, so let's talk about >> it. >> >> Is there a reason you can't do this at the entry point or downstream >> (e.g., during reporting)? Or put another way, why do you need this >> feature in the XForm? >> >> Thanks, >> >> Yaw >> >> On Mon, May 22, 2017 at 1:13 PM, Karim Derra wrote: >> > Dear Community, >> > >> > I am looking for the string function which can convert a lowercase to >> > uppercase in XML Form? >> > I tried this function :"upper-case()" but did not working. >> > >> > Thanks in advance. >> > Regards, >> > Karim >> > >> > >> > >> > >> > Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit : > Dear >> > Community, > > I am the beginner in ODK environment and I am developing a >> > database to collect information in health area. > My question is: How can I >> > only allow to include uppercase only in text type to avoid case sensitivity >> > during data collection? For example, in the name of the facility, name of >> > the patient, etc. > > I am looking forward to hear from you. > Best regards, >> >> Antonio. >> > >> > -- >> > -- >> > 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 a topic in the Google Groups "ODK Community" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/topic/opendatakit/bzUx6paP8MU/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.

Also, if you have fixed sets of names that the user should select, you
should consider using the select-one or select-multiple prompts, and
supplying the fixed set of values. For large sets of values, see
http://opendatakit.org/help/form-design/external-itemsets/

A typical use case is for cascading selects (e.g., choose province, choose
town, choose facility)

··· On Thu, Jul 17, 2014 at 9:18 AM, Bashir Jahed wrote:

The challenge with this approach is that although the user will not be
able to proceed if he/she has entered lower case text they will still be
able to insert lower case text and they will have to explicitly select
uppercase letters while typing. This may be inhibitive or counterproductive.

Why not convert to upper case text post data capture if you require it to
be uppercase.

Bashir

From: opendatakit@googlegroups.com [mailto:opendatakit@googlegroups.com]
*On Behalf Of *Mokpokpo ADJEODA
Sent: 17 July 2014 03:36 PM
To: opendatakit@googlegroups.com
Subject: [ODK Community] Re: How to use Uppercase text only in ODK

Hi Antonio,

type

name

label

constraint

text

hh1

Your name

regex(., "[1]{1,15}$")

Le jeudi 17 juillet 2014 10:17:42 UTC, Antonio Niquisse a écrit :

Hi Mokpokpok,

Thank you for your reply.
I forgot to say that I am using XLSForm. Therefore, I have included the
code you sent but it does not give any effect.
Is that code suit for XLSForm environment?

Best regards,
Antonio.

On Thursday, July 17, 2014 11:45:06 AM UTC+2, Mokpokpo ADJEODA wrote:

Hi Antonio,

Answer must beuppercase letters and between 1 and 10 characters long for
example

constraint= regex(., "[2]{1,15}$")

http://opendatakit.org/help/form-design/binding/

Le jeudi 17 juillet 2014 09:00:46 UTC, Antonio Niquisse a écrit :

Dear Community,

I am the beginner in ODK environment and I am developing a database to
collect information in health area.
My question is: How can I only allow to include uppercase only in text
type to avoid case sensitivity during data collection? For example, in the
name of the facility, name of the patient, etc.

I am looking forward to hear from you.
Best regards,
Antonio.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups..google.com/group/opendatakit?hl=en
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.


http://www.avast.com/

This email is free from viruses and malware because avast! Antivirus
http://www.avast.com/ protection is active.

--

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


  1. A-Z ↩︎

  2. A-Z ↩︎

Hello everyone, I was wondering if it is possible to force user to enter only Upper case letter with digits and only 11 characters. For example "AA11AAAAAAA"

Looking forwards for your answers.

Best regards,

Hi @Anil_GUNAYDIN
welcome to the forum! Please introduce yourself here!

you need to use regex
here is a sampleuppercase.xlsx (5.3 KB) form that should work for you:

Hello @Grzesiek2010 thank you for your quick reply. this formula force users to enter upper case letter but I wanted to force them to enter both upper case letter and numbers . Could you please help for this question also ?

Kind regards,

For 11 characters, and accepting either capital letters or numbers, change the regex expression to:
regex(.,'^[A-Z0-9]{11}$')

1 Like

Thank you so much for your help and it works @danbjoseph

HI! thanks for the reply, but I was looking for something that converts to lowercase without bother the user during the form filling, telling him using only upper or lower case, for example, when filling an email field: I don't care how the user write it down but I want it in the database in lowercase...

Is there an option to achieve this?
thank you!

No, at this moment there is no function to do that automatically.

For posterity's sake... You can use translate in a calculate field, like this:
translate(${THE_FIELD},'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')

1 Like