Checking the value of field and displaying if it's good or not.

M

MDaetz

I'd like users to input a four digit number into a text field, and have
another field tell them if the number is good or not. I have 64 "good"
numbers that I need to check against to see if the number is good. So for
example, in field1, they would input "0610". In field2, a message would
appear saying "The number is good", if it's good or "The number is bad", if
it's bad.

Any thoughts on how to this?
 
S

Swathi (GGK Tech)

Hi,
By suing rules you can achieve this. Follow the below steps.
1.Go to the field properties. Click Rules button.
2.Click Set condition. Select the field in first drop down, matches pattern
in second drop down, \d\d\d\d (custom pattren) in third box.
3.Click Add action. Select ‘set a field’s value’ in Action drop down,
select the second field in Field, Enter “It’s a good number†in value.
4.Click ok.
5.Again add another rule. Now set the condition with not matches pattern
same as in step2.
6.Now set the field value as “It’s a bad numberâ€.
 
M

MDaetz

It's not the format that I'm concerned with...it's the ability to know if the
value that has been input is a "good" value. For example, every state in
america has a two letter abbreviation. Imagine creating a field (field1) that
when you type ZZ it would tell you that "no state exists with that
abbreviation", and if you type CA it would tell you "a state does exist with
that abbreviation". How can I store the 50 states 2 letter abbreviations and
cross check it to the value of field1?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top