J. Williams Posted October 30, 2008 Posted October 30, 2008 I haven't come here begging for quite a while... and hope I'm posting in the correct place. I'd like to create a (text?) field that requires no less than and no more than six alpha/numeric characters (in any combination - all of one or the other, or mixed). Possible? If so, will someone please shove me in the right direction re: how to accomplish?
LaRetta Posted October 30, 2008 Posted October 30, 2008 You can use field-level validation. In Define Fields on that particular field, select the Options and the second tab called validation. In validation by calculation, it would look like: Length ( yourFieldName ) = 6 You want the validation to produce true (1) and this will. You can enter a message at the bottom and also control whether they can override the warning or whether you will refuse the text if they do not comply. Also, you specify alpha/numeric but what about other symbols such as -$. etc. If you want to refuse those types of characters, your calculation will need to take that into effect. You can also just combine auto-enter (Replace) with your validation so that, if you decide you don't want to allow those symbols, you can automatically remove them (but allow them in validation). May ways to go here ... can you define your rules more specifically?
J. Williams Posted October 31, 2008 Author Posted October 31, 2008 I remember why I totally appreciate this Forum! Thanks for helping out. For example, I'd like to force entry in the field as 1A2345, while disallowing: 1A234[color:red], [color:red]-1A2345, 1A2345[color:red]v, 1[color:red]a2345, etc. So, yes please, I'd like to refuse other symbols if doable. You can use field-level validation. In Define Fields on that particular field, select the Options and the second tab called validation. In validation by calculation, it would look like: Length ( yourFieldName ) = 6 You want the validation to produce true (1) and this will. You can enter a message at the bottom and also control whether they can override the warning or whether you will refuse the text if they do not comply. Also, you specify alpha/numeric but what about other symbols such as -$. etc. If you want to refuse those types of characters, your calculation will need to take that into effect. You can also just combine auto-enter (Replace) with your validation so that, if you decide you don't want to allow those symbols, you can automatically remove them (but allow them in validation). May ways to go here ... can you define your rules more specifically?
LaRetta Posted October 31, 2008 Posted October 31, 2008 We can do this but you are asking for more than simply omitting other symbols. It appears that you don't want to allow small letters. It also seems that you only want the letter to be second position. I suspect it might be better to handle this with combination of Auto-Enter ( Replace ) and validation whereas you assist your Users a bit. For instance, if only capital letters are ever allowed, you can have the small [color:green]a in [color:green]1a2345 convert automatically before the validation fires. This calculation added to auto-enter (and be sure to UNCHECK Do Not Replace Existing Value For Field...) would refuse to allow all strange symbols and will convert letters to uppercase first: Upper ( Filter ( yourField ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890" ) ) If, however, you need to be sure the second character in your string is the only place an alpha is allowed then we will need to do some more work. Can you pin these rules down further for me? Because even with auto-enter assistance and validation, text such as [color:green]3224AA would pass validation and I don't feel that's what you want. LaRetta
J. Williams Posted October 31, 2008 Author Posted October 31, 2008 (edited) Yes re: requirement/validation to ensure no alpha lower case No re: specific alpha/numeric placing... [color:green]3224AA would be acceptable. So this might do it, eh? I'll try it out. ...It appears that you don't want to allow small letters. It also seems that you only want the letter to be second position.... Can you pin these rules down further for me? Because even with auto-enter assistance and validation, text such as [color:green]3224AA would pass validation and I don't feel that's what you want. Edited October 31, 2008 by Guest
LaRetta Posted October 31, 2008 Posted October 31, 2008 It should do it for you then. Use the auto-enter (replace) calculation and also the Length ( yourField ) = 6 validation. :^)
Recommended Posts
This topic is 5920 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now