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

Recommended Posts

Posted

How could I do to set a minimum size for a numerical field. I.e. a number that must always be 10 digits long, or 7... Thank you.

Posted

You can use Length(yourNumberField). Filemaker is pretty lenient about data types.  You could set it as a field  validation ( Length(yourNumberField)=10 ) or in a script.

Posted

What are you trying to accomplish.

 

If the field is 1234

do you want it to look like 0000001234 or 1234000000

If the field is 123.4

do you want 123.4000000

Posted

Lee makes a good point ... if this is a numerical field, there is no 10-digits really.  There is integer of 100,000,000 or more than 2 decimal points.  If this is a phone number (which is what it looks like; 10 with area code, 7 without) then it should be result type text instead.  Please provide the purpose of this number.  :^)

Posted

I have made an indexed numerical field.

 

Doughemi: results following your suggestion

validated by calculation: length (myfield) = 14,

12345678912345 shows 1,2346e+13 if format is general in data formatting, if format is as entered works fine.

 

My first need was just a field to place some given numerical code and as it is always 14 digits length (“length” calc, silly of me), I didn’t want to make mistakes. Usually has many ceros. I.e. 02700000000014, so I wanted to be sure that always has the correct length.

 

Seen what Lee says... wow, I’d like to learn how to do that, for sure I am going to need it any time.

 

LaRetta: is not a phone number but of course I see is the correct way to validate phone numbers so I’ll use it.

 

I appreciate all your help.

 

Thank you very much.

Posted
Usually has many ceros. I.e. 02700000000014, so I wanted to be sure that always has the correct length.

 

"02700000000014" is text, not a number, so adjust your field type. This will also prevent displaying the entry in scientific notation e.g.1,2346e+13.

Posted (edited)
Is it because starts by 0?

 

Yes.

 

 

Not alwayd starts by 0.

 

Once is enough.

 

---

Numbers are values that are meant to be processed numerically: e.g. summed or multiplied. Phone numbers, ZIP codes, vehicle registration numbers etc. are not numbers, even if expressed by digits.

Edited by comment
Posted

I apologize for my post. I am using tapatalk from my cell phone and I can see the carriage returns, but they don't appear in the web page. Neither the signature.

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