Survey123: constraint on percentage field?

1999
2
Jump to solution
04-06-2018 08:26 AM
HélèneTouyéras
Occasional Contributor II

Apologies if this is very basic..My survey formular contains a "% mortality" filed. I would like to constrain users to entering values beween 0 and 100.

I have looked here, and here, but could not derive a working solution from either page. 

Any ideas?

Many thanks!!

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi Hélène,

You would need to create a compound statement using both less than (<) and greater than (>), using the and operator to specify that both parts of the statement must be true.  Using the period (.) to refer to the value of the question, the constraint would be:

. > 0 and . < 100

If 0 and 100 are allowed as values, use >= and <= instead of > and <.

View solution in original post

2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Hélène,

You would need to create a compound statement using both less than (<) and greater than (>), using the and operator to specify that both parts of the statement must be true.  Using the period (.) to refer to the value of the question, the constraint would be:

. > 0 and . < 100

If 0 and 100 are allowed as values, use >= and <= instead of > and <.

HélèneTouyéras
Occasional Contributor II

Brilliant - many thanks for the adequate and very fast response!

0 Kudos