How to Restrict field for entry Less than 50000

Hi

Can any one guide that how to restrict the entry for less than 50000 means entry can be for 1 - 50000 but not more that 50000.

Cheers !

Neeraj

Do you mean restricting an input value between 1 to 50000 through a regex code?

Hi @Kal_Lam

yes

Cheers !

Neeraj

@caneeraj, you could do it as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enketo: when an entry is made that is outside a range

Data entry screen as seen in Enketo: when an entry is made that is inside a range

Data entry screen as seen in Enketo: when an entry is made that is inside a range

Data entry screen as seen in Enketo: when an entry is made that is inside a range

Data entry screen as seen in Enketo: when an entry is made that is outside a range

Reference xlsform:

Regex_Constraint.xlsx (10.0 KB)

Thanks a Lot.

Cheers !

Neeraj

1 Like

Hello,
You might also study support articles:
[Limiting Responses with Validation Criteria — KoBoToolbox documentation
And you can always try the search function of this forum, e.g. “how restrict number question”
https://community.kobotoolbox.org/t/how-to-restrict-a-number-question-from-1-to-4/9829

1 Like

Hello,
If the valid numbers are 1… 50000 without leading zeros, you could just use an integer type variable with a numeric constraint . >= 1 and . <= 50000.

1 Like

Hi @wroos

Thanks a lot ,it has been solved.

can you please look in to this , if possible

Cheers !

Neeraj

1 Like