January 6, 200521 yr I'm trying to set up a field validation forcing the user to always enter lower-case data. I can't get a calculation function to recognize the difference between "A" and "a". I managed to validate to numbers are required, with a Case with PatternCount test on all ten digits. But the case issue has me stumped. Steve Brown
January 7, 200521 yr You could also automatically change the case by formatting the case, as follows: Layout Mode | select field | Format | Text | Case | lowercase. Of course, everywhere you use this field you must use this same format!
January 7, 200521 yr Ender, is your calc just a difference in style, or do you find that Exact() works faster or more reliably? (Or was it simply a simultaneous post?) J
January 7, 200521 yr Well, i'll be. I thought for sure i had done it with = before, but i guess i should have tested. Apologies to the original poster for the confusion. J
January 7, 200521 yr Author Very nice. Thanks all. I'm trying to set up a field for a user to create a new password. I want this new password to always be all lowercase, and it must include one or more numbers. Using a test field called "Valitest," I am validating with this: Case(PatternCount(Valitest, "1"), 1, PatternCount(Valitest, "2"), 1, PatternCount(Valitest, "3"), 1, PatternCount(Valitest, "4"), 1, PatternCount(Valitest, "5"), 1, PatternCount(Valitest, "6"), 1, PatternCount(Valitest, "7"), 1, PatternCount(Valitest, "8"), 1, PatternCount(Valitest, "9"), 1, PatternCount(Valitest, "0"), 1, Exact(Valitest, Lower(Valitest)), 1, 0) This seems to do the job. Normally Filemaker's persistent case insensitivity is something I appreciate. It's nice to know of a handy function like Exact for those special needs. Steve Brown
January 7, 200521 yr Author Er, that doesn't work, but *this* does: Case(PatternCount(Valitest, "1") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "2") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "3") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "4") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "5") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "6") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "7") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "8") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "9") and Exact(Valitest, Lower(Valitest)), 1, PatternCount(Valitest, "0") and Exact(Valitest, Lower(Valitest)), 1, 0) Steve Brown
January 7, 200521 yr Your case will stop as soon as it finds a number. Better use an "and": Case( (PatternCount(Valitest, "1") or PatternCount(Valitest, "2") or PatternCount(Valitest, "3") or PatternCount(Valitest, "4") or PatternCount(Valitest, "5") or PatternCount(Valitest, "6") or PatternCount(Valitest, "7") or PatternCount(Valitest, "8") or PatternCount(Valitest, "9") or PatternCount(Valitest, "0")) and Exact(Valitest, Lower(Valitest)), 1)
January 7, 200521 yr Actually, we can simplify this a bit more by getting rid of the case: (PatternCount(Valitest, "1") or PatternCount(Valitest, "2") or PatternCount(Valitest, "3") or PatternCount(Valitest, "4") or PatternCount(Valitest, "5") or PatternCount(Valitest, "6") or PatternCount(Valitest, "7") or PatternCount(Valitest, "8") or PatternCount(Valitest, "9") or PatternCount(Valitest, "0")) and Exact(Valitest, Lower(Valitest))
January 7, 200521 yr Why not TextToNum(Substitute(Substitute(Substitute(digitest;"0";"1");"n";"y");"f";"t")) and Exact(Valitest, Lower(Valitest)) I'm even unsure the n to y and f to t substitution are needed. I would say TextToNum(Substitute(digitest;"0";"1")) and Exact(Valitest, Lower(Valitest)) is sufficient
March 17, 200520 yr Hi All, In FM7, how about simplifying by using the Filter function: (not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))
March 17, 200520 yr Hi All, In FM7, how about simplifying by using the Filter function: (not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))
March 17, 200520 yr Hi All, In FM7, how about simplifying by using the Filter function: (not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))
March 18, 200520 yr Why would you be insisting that a password be all lowercase? And why not just have the field have an auto-enter calculation: [replace] = Evaluate ( "Lower ( pwdField )" ; pwdField ) This will automatically replace any uppercase text with its lowercase equivalent when the user leaves the field.
March 18, 200520 yr Why would you be insisting that a password be all lowercase? And why not just have the field have an auto-enter calculation: [replace] = Evaluate ( "Lower ( pwdField )" ; pwdField ) This will automatically replace any uppercase text with its lowercase equivalent when the user leaves the field.
March 18, 200520 yr Why would you be insisting that a password be all lowercase? And why not just have the field have an auto-enter calculation: [replace] = Evaluate ( "Lower ( pwdField )" ; pwdField ) This will automatically replace any uppercase text with its lowercase equivalent when the user leaves the field.
Create an account or sign in to comment