Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

To all,

I have a script that checks to make sure a 2 Letter abbreviation is entered into my Global field=Abbreviation.

I can check to make sure the field isn't empty but

Which function do I use to check it's not a number or the string contains a numerical value?

i. A2, 34, B8B, ABC9 etc

cheers in advance

Posted

Case(Position("0123456789",Left(Abbreviation,1),1,1),0,

Position("0123456789",Middle(Abbreviation,2,1),1,1),0,

Length(Abbreviation)>2,0,

1)

This will return 0 (logical false) for invalid values, and 1 (logical true) for a good value.

  • 2 weeks later...
Posted

BTW, a tip about validating global fields: you don't necessarily need to use a script to perform the validation.

Try this: create a standard field of the type that the global field will eventually be (i.e., a number field if what you really want is a global number field). Set the validation for the field. Then change the field type from a normal field to a global field of the same type. The validation will stay with the field.

Chuck

Posted

BTW, a tip about validating global fields: you don't necessarily need to use a script to perform the validation.

Try this: create a standard field of the type that the global field will eventually be (i.e., a number field if what you really want is a global number field). Set the validation for the field. Then change the field type from a normal field to a global field of the same type. The validation will stay with the field.

Chuck

This topic is 8655 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.