Number Field Improvements

I would like to see things like:

1) Allow leading zeros (Yes/No)

2) Format Mask (So we can for example set 0000000 and allow people to just enter 1234 but show as 0001234 so mixed with the Custom to allow Pre/Post text we could have PO-0001234 by just entering 1234 or PO-0012345 by just entering 12345).

Hi there! While we don't currently have the option to automatically add leading zeros to a number field, you can still implement leading zeros in your app. 

This will have to be created using a short text field with Conditional Rules. Let's call this field Zeros. The Zeros field will have 4 conditional rules, if you want numbers with 5 digits. The rules will be as follows:

1. If AI (your auto-increment field) is less than 10, set value to 0000

2. If AI is less than 100 and greater than 10, set value to 000

3. If AI is less than 1,000 and greater than 100, set value to 00

4. If AI is less than 10,000 and greater than 1,000, set value to 0

Then add a text formula that combines the Zeros field with the AI field for an auto-increment with leading zeros. You can also add whatever pre/post text you desire to that text formula.

Hi,

I just stumbled on your post whilst I too was trying to work out how to generate leading zeros on a 5 digit integer (even if it involves me maybe using a text formula, in some way).  I've not given up yet, but if it transpires that acheiving leading zeros is just not possible, then more flexible custom number formatting within Knack would indeed be a valuable enhancement.

With regard to your point about setting the start number (where I guess you are referring to auto-increment fields), you can achieve this, relatively simply, by creating an auto-increment field, plus a further equation field that adds a number of your choice to the current auto-increment field value.  If your equation adds 1000 to the auto-increment field value, for example, and then you insert the first record into the table, the value of the auto-increment will be 1 and the value of your eqaution field will be 1001.

Cheers Steve

Hi,

By Pre/Post Text I mean Prefix & Suffix.

Would also be nice to set the start number.

Thanks

Dan