toolUser Posted July 29, 2004 Posted July 29, 2004 This must easy given how common it is, I just don't see how. One of the most important things in a database is ensuring that the entered data is in the correct format. For example: I have two fields, IP address and MAC address. IP must be in the format of; [1-3 digits].[1-3 digits].[1-3 digits].[1-3 digits], like this 111.25.69.87 The "." must be a period, nothing else. MAC address must be [2 hex digits]:[2 hex digits]:[2 hex digits]:[2 hex digits]:[2 hex digits]:[2 hex digits], Like this 23:0a:8d:00:23:bc The seperator must be a colon and the alpha hex characters must be lowercase. Where does a template or whatever exist to enforce this? Thanks, Jerry
Lynn Johnson Posted July 29, 2004 Posted July 29, 2004 Validation by calculation using the text functions should do this. The function will be long but should be straightforward. I have a database with entries which must be exactly 8 numeric characters or two specific letters followed by 6 numerics. The function is 17 lines long, but it works fine. Basically it selects each character position and verifies that the characters are within the acceptable range. If they are not a dialog is presented to the user until a valid entry is made. Scripts may also be a viable option.
toolUser Posted July 29, 2004 Author Posted July 29, 2004 Well, that's hard to believe. But, maybe so. I haven't been able to find any examples like that, can you either show yours or point me to some examples? Thanks, Jerry
RalphL Posted July 29, 2004 Posted July 29, 2004 You can use Filter to limit the characters to, lower to convert all alphas to lower case. You can use Middle to get characters and compare them to the separators. There is a good example of a telephone number formating in the FileMaker Business Tracker which can be downloaded from the FMI web site.
Recommended Posts
This topic is 7490 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