May 31, 200619 yr I think i am missing something obvious, but how do you set a field so that it must contain a specific number of characters? i.e. only three digit numbers?
May 31, 200619 yr You are asking for two different things: length(field)=x would be for a specific number of characters (swap x for 3). But, this would also allow values that are not three digit numbers, like "HAT". Do you need it to be only numbers? Decimal values OK (would make a three digit number more characters...)? -Raz
May 31, 200619 yr Author would length(getasnumber(field)) solve to only allow numbers? i hadnt thought of decimals, but there will never be an instance when they are needed. basically i have a lot of fields that require either two, three or four digit whole numbers. i dont want to allow any other values in these fields. sorry if i dont explain this well!
May 31, 200619 yr For three digits; how about setting as a number field and: field>=100 and field <=999 and Int(field)=Field
May 31, 200619 yr Author hey that is slick, but what if the number is 001? would that still work if i changed to >=001? these are specific codes so even if it is a single digit number, the leading zeros have to be there. thanks!
May 31, 200619 yr Why not check the "Numeric Only" option, then add a calculation of Length (field) = n?
Create an account or sign in to comment