Adding limits

Good day

How does one get to set limits on an open ended numeric question on KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and a maximum of 30.

Regards

Thulani

Go to settings (in the numeric questions) and in Validation Criteria field click on Manually enter your validation logic in XLSForm code and paste this code

string-length(.) >= 5 and string-length(.) <= 30

``

···

El lunes, 15 de febrero de 2016, 8:30:07 (UTC-3), Thulani Gebuza escribió:

Good day

How does one get to set limits on an open ended numeric question on KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and a maximum of 30.

Regards

Thulani

1 Like

I was checking the code again and realize that when the integer is larger than 16 digits, kobo automatically converts it in an exponential number.

So, my recommendation is to create a text question and instead the code I gave you up; use this one

regex(., ‘[0-9]’) and string-length(.) >= 5 and string-length(.) <= 30

``

what this code does is to restrict the field only to accept numbers and also restrict the length

Regards,

K.

···

El lunes, 15 de febrero de 2016, 8:30:07 (UTC-3), Thulani Gebuza escribió:

Good day

How does one get to set limits on an open ended numeric question on KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and a maximum of 30.

Regards

Thulani

1 Like

Thulani, are you seeking to restrict the number of digit (length) if the answer, or just that the number provided has to be between 5 and 30?

···

On Mon, Feb 15, 2016 at 2:21 PM, Enrique Ramírez dana...@gmail.com wrote:

I was checking the code again and realize that when the integer is larger than 16 digits, kobo automatically converts it in an exponential number.

So, my recommendation is to create a text question and instead the code I gave you up; use this one

regex(., ‘[0-9]’) and string-length(.) >= 5 and string-length(.) <= 30

``

what this code does is to restrict the field only to accept numbers and also restrict the length

Regards,

K.

El lunes, 15 de febrero de 2016, 8:30:07 (UTC-3), Thulani Gebuza escribió:

Good day

How does one get to set limits on an open ended numeric question on KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and a maximum of 30.

Regards

Thulani

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

Hi Patrick

the number provided has to be between 5 and 30

···

On 15/02/2016, Patrick Vinck <zon...@gmail.com> wrote:

Thulani, are you seeking to restrict the number of digit (length) if the
answer, or just that the number provided has to be between 5 and 30?

On Mon, Feb 15, 2016 at 2:21 PM, Enrique Ramírez <dana...@gmail.com> > wrote:

I was checking the code again and realize that when the integer is larger
than 16 digits, kobo automatically converts it in an exponential number.

So, my recommendation is to create a text question and instead the code I
gave you up; use this one
regex(., '[0-9]') and string-length(.) >= 5 and string-length(.) <= 30

what this code does is to restrict the field only to accept numbers and
also restrict the length

Regards,

K.

El lunes, 15 de febrero de 2016, 8:30:07 (UTC-3), Thulani Gebuza >> escribió:

Good day

How does one get to set limits on an open ended numeric question on
KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and
a
maximum of 30.

Regards
Thulani

--
You received this message because you are subscribed to the Google Groups
"Kobo Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kobo-users\.
For more options, visit https://groups.google.com/d/optout\.

--
You received this message because you are subscribed to a topic in the
Google Groups "Kobo Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/kobo-users/JZ00zjaEmGU/unsubscribe\.
To unsubscribe from this group and all its topics, send an email to
kobo-users+...@googlegroups.com.
To post to this group, send email to kobo-...@googlegroups.com.
Visit this group at https://groups.google.com/group/kobo-users\.
For more options, visit https://groups.google.com/d/optout\.

Hi Thulani,

  1. You need to first add a question and select the ‘number’ as question type.
  2. Once the question is added, you need to edit the question settings - click on the cogwheel on the top right corner of the question box.
  3. The settings option will appear with a menu bar on the left with three options - Question Options / Skip logic / Validation criteria
  4. Select Validation Criteria
  5. Select ‘add a condition’
  6. Enter the condition using the signs and values you want - you will have the option to add multiple conditions, and make sure to select that the question must meet all the criteria specified. Your screen should look like the attached.

···

On Mon, Feb 15, 2016 at 4:47 PM, Thulani Gebuza thul...@fgi.co.za wrote:

Hi Patrick

the number provided has to be between 5 and 30

On 15/02/2016, Patrick Vinck zon...@gmail.com wrote:

Thulani, are you seeking to restrict the number of digit (length) if the

answer, or just that the number provided has to be between 5 and 30?

On Mon, Feb 15, 2016 at 2:21 PM, Enrique Ramírez dana...@gmail.com

wrote:

I was checking the code again and realize that when the integer is larger

than 16 digits, kobo automatically converts it in an exponential number.

So, my recommendation is to create a text question and instead the code I

gave you up; use this one

regex(., ‘[0-9]’) and string-length(.) >= 5 and string-length(.) <= 30

what this code does is to restrict the field only to accept numbers and

also restrict the length

Regards,

K.

El lunes, 15 de febrero de 2016, 8:30:07 (UTC-3), Thulani Gebuza

escribió:

Good day

How does one get to set limits on an open ended numeric question on

KoboCollect?

These would be, for example, a question that accepts a minimum of 5 and

a

maximum of 30.

Regards

Thulani

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

“Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an

email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the

Google Groups “Kobo Users” group.

To unsubscribe from this topic, visit

https://groups.google.com/d/topic/kobo-users/JZ00zjaEmGU/unsubscribe.

To unsubscribe from this group and all its topics, send an email to
kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to the Google Groups “Kobo Users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to kobo-users+...@googlegroups.com.

To post to this group, send email to kobo-...@googlegroups.com.

Visit this group at https://groups.google.com/group/kobo-users.

For more options, visit https://groups.google.com/d/optout.

1 Like