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

Recommended Posts

  • Newbies
Posted

Hi,

I am somewhat new at using FM6 but not a complete "newbie". I have a field that needs to be exactly 10 digits (no more or less) and the number can start with leading zeroes (ie - 0000123456). I cannot figure out how to set up a field like this. I've tried to do it using calculation but cannot seem to get it to work.

My application has two fields in particular, one is 8 digits and one is 10 digits and my end users occasionally put the 8 digit code in the 10 digit space thus causing some reporting problems.

Anyone done something like this before? confused.gif

Thanks in advance!

Posted

If you only have numbers and not spaces or dashes then validate by calculation:

If(Length(number field) = 10,1,0)

Make sure your number format is "Leave Data formatted as entered"

Posted

No need for the IF because...

Length(number field) = 10

... will return 1 if true and 0 if false.

In FMP 6 and earlier a number field will strip leading zeros, but a text field will not. I believe this has changed with FMP 7.

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