/
Add Padding 0's to Numbers

Add Padding 0's to Numbers

Adding Padding to a Number in Card Designer

To format a number with padding (e.g., ensuring it has a specific number of digits), you can use the Integer format option in Card Designer. Follow the steps below:

Steps:

  1. Select the Object:

    • In the Card Designer interface, choose the object containing the number you want to format.

  2. Open the Properties Menu:

    • Navigate to the properties pane to modify the object's settings.

  3. Access the Content Tab:

    • Go to the Content tab to access formatting options.

  4. Choose the Integer Format:

    • In the Format section, find and select the drop-down option labeled Integer.

  5. Input the Desired Format:

    • For padding, use the format 'd' followed by the number of digits. For example:

      • To format a number as three digits, use 'd3' or 'D3'.

      • This ensures that the number will have at least three digits, with leading zeros if necessary (e.g., 005 for 5).

Untitled-20240912-222108.png

Important Notes:

  • Design vs. Stored Value:

    • This formatting applies only to the design or display of the card. It does not alter the actual stored value of the number.

    • If you need the number to be stored with the padding, repeat the same formatting process for a Storage Item object.

Related content

Retaining Leading Zeros in Number Values
Retaining Leading Zeros in Number Values
More like this
DESFire UID manipulation
DESFire UID manipulation
More like this
Create-a-Card Wizard
Create-a-Card Wizard
More like this
Technote 17/07 - Advanced Designer Objects
Technote 17/07 - Advanced Designer Objects
More like this
Technote 19/02 - Using regular expressions
Technote 19/02 - Using regular expressions
More like this
DESFIRE UID Manipulation Hex.Dec
DESFIRE UID Manipulation Hex.Dec
More like this