Jump to content

This topic is 7283 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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!

Posted

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

Posted

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

Posted

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)

Posted

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))

Posted

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

  • 2 months later...
Posted

Hi All,

In FM7, how about simplifying by using the Filter function:

(not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))

Posted

Hi All,

In FM7, how about simplifying by using the Filter function:

(not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))

Posted

Hi All,

In FM7, how about simplifying by using the Filter function:

(not ( IsEmpty ( Filter ( valitest ; "0123456789")))) and ( IsEmpty ( Filter ( valitest ; "ABCDEFGHIJKLMNOPQRSTUVWXYZ")))

Posted

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.

Posted

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.

Posted

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.

This topic is 7283 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.