June 27, 200520 yr Newbies 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? Thanks in advance!
June 27, 200520 yr 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"
June 27, 200520 yr Author Newbies OMG. Thanks so much. I have been banging my head on the desk over this one.
June 28, 200520 yr 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.
Create an account or sign in to comment