Enigma20xx Posted January 5, 2013 Posted January 5, 2013 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.
doughemi Posted January 5, 2013 Posted January 5, 2013 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.
Lee Smith Posted January 5, 2013 Posted January 5, 2013 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
LaRetta Posted January 5, 2013 Posted January 5, 2013 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. :^)
Enigma20xx Posted January 5, 2013 Author Posted January 5, 2013 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.
comment Posted January 5, 2013 Posted January 5, 2013 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.
Enigma20xx Posted January 5, 2013 Author Posted January 5, 2013 Is it because starts by 0? Not alwayd starts by 0. Thanks comment.
comment Posted January 5, 2013 Posted January 5, 2013 (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 January 5, 2013 by comment
Enigma20xx Posted January 5, 2013 Author Posted January 5, 2013 What a truth! Once is enough. As clear as water. Thank you comment.
Enigma20xx Posted January 5, 2013 Author Posted January 5, 2013 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now