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 6040 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello,

This should be fairly easy but running into problems.. field remains blank.

What I'm trying to is to confirm that the contents (a number) entered into a field is of certain length and if not return a text error message.

Here is what I thought might work...

If (Length(Field_name = 16); ""; "Please confirm the number")

Is there something I may be overlooking and if so, can you point me in the right direction?

TIA.

Jack

Posted

Where are you putting this calculation: in the field's validation options?

Is the field of type text or number?

Posted

If it's a number then don't validate it as text, use a numerical range instead in the "within rage" option...

1000000000000000 to

9999999999999999

Note that this won't work if you expect the number to contain leading zeros; FMP will strip off the leading zeros in a number field (because numbers don't have leading zeros). In this case, DO use a text field to store the "number" (it's really a text string) and use the calculation

Length( field ) = 16

You could get fancier and filter out all non-numeric characters in the validation calculation too.

The validation message does not go into the validation calculation itself; it goes into the "display a message" panel at the bottom of the dialog.

Lastly, note that validation occurs when the record is committed, not when the field is exited.

Posted

Hi Vaughan!

Thanks for the update; I had just finished up tinkering with the field definition just prior to reading your response and they are equivalent. Everything works as planned =)

Thanks for your assistance.

Jack

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