restrict integer


Author
Message
S.Weber
S.Weber
Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)
Group: Forum Members
Posts: 9, Visits: 54
Hello,
I´m a really beginner and I need some help, please.

How can I create an expression with an restricted input from an integer from 01001 to 99998? These are our possible ZIP-Codes, therefore I need the zero in the beginning and the limitation to 5 digits.
Can somebody help, please?
Thank you!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
S.Weber - Monday, April 15, 2019
Hello,
I´m a really beginner and I need some help, please.

How can I create an expression with an restricted input from an integer from 01001 to 99998? These are our possible ZIP-Codes, therefore I need the zero in the beginning and the limitation to 5 digits.
Can somebody help, please?
Thank you!


If you are using a <textbox> or <openended> to collect the ZIP-code, you should not need any expression. You should be able to use the /mask attribute set to uszipcode

https://www.millisecond.com/support/docs/v4/html/language/attributes/mask.htm

Alternatively, you can tailor a regular expression to your needs (see e.g. https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s14.html) and put that in the /mask attribute.


S.Weber
S.Weber
Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)Respected Member (379 reputation)
Group: Forum Members
Posts: 9, Visits: 54
Dave - Monday, April 15, 2019
S.Weber - Monday, April 15, 2019
Hello,
I´m a really beginner and I need some help, please.

How can I create an expression with an restricted input from an integer from 01001 to 99998? These are our possible ZIP-Codes, therefore I need the zero in the beginning and the limitation to 5 digits.
Can somebody help, please?
Thank you!


If you are using a <textbox> or <openended> to collect the ZIP-code, you should not need any expression. You should be able to use the /mask attribute set to uszipcode

https://www.millisecond.com/support/docs/v4/html/language/attributes/mask.htm

Alternatively, you can tailor a regular expression to your needs (see e.g. https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s14.html) and put that in the /mask attribute.


Perfect! Thank you!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search