Field Validation Rule

DBFIN

Registered User.
Local time
Today, 11:26
Joined
May 10, 2007
Messages
205
I want to create a field validation rule that requires the user to input a policy number in a standard format. The format has a fixed length of 13 with three underlying components. The first 3 digits identify coverage, the next 7 are the policy number and the final three must always be "-00".

Example: GLO1234567-00

Is it possible to create a validation rule for this ? If so, can you provide the code based on the simple example above ? As always, your help is greatly appreciated.
 
This doesn't require a format validation, this requires you store your data properly. This should not be 1 field in a table, it should be 2 fields. You need to seperate this data at the table level by creating 1 field for the coverage and 1 field for the policy. And since the trailing 00s are for everything, you don't need to store them.

On your input form you set up something that mimics what the entire thing looks like so that the user inputs it properly. Then when you need to spit it out on a report you take the parts and construct it so that it appears correctly:

FullPolicyNumber: [Coverage] & [Policy] & "-00"
 
Your recommendation makes perfect sense, however there is an issue with this. The database was already released into production about six months ago. Is there a way to create a validation rule with the existing 13 digit single field ?
 
I created an input mask with the following syntax:
"LLL0000000-00". When I tested it and typed in GLO9808091-00 I received an error message that the format was not appropriate. Is there something wrong with my syntax ?
 
The input mask worked. Thanks everyone. :)
 

Users who are viewing this thread

Back
Top Bottom