2

In the project controls software I am working on, uses needs to generate unique codes before exporting scheduling data to dedicated scheduling software. Part of this code will be an ascending number.

It is a requirement to support leading zeros. This means that zeros will be prefixed to a number when it is below a certain amount of digits. This way, your numbers will always have roughly the same width. Instead of:

  • 10
  • 100
  • 1000

You will see

  • 0010
  • 0100
  • 1000

The current solution is to have the user enter a numeric value in a text field labeled 'minimum width'. This is a technical term, and I assume it is unclear what the effect of this value is without trial and error. I cannot find specific examples of how to make this feature clear to the user. How would I do this?

Thanks in advance.

1
  • How about "number of digits for pass code"? Couldn't the system check what's the longest number is and just set the setting to that length, e.g. 12345 -> 5?
    – Nash
    Commented Feb 18, 2021 at 14:07

1 Answer 1

1

I guess what you are looking for is "minimum number of digits", or if you support non-digit characters then "minimum number of characters".

I think it would also be perfectly acceptable to use "length" if you prefer, as in: "Minimum length".

Perhaps this is enough information for the user as it is, however you may consider adding an addition explanation that help makes it more clear, if your design allows for adding longer explanations of course...

The "minimum number of digits" specifies the minimum length that a generated code must be. If a code is shorter than the minimum length, then leading zeros are prepended until the minimum length is satisfied. For example, the code "123" with a minimum length of "5" will be generated as "00123".

So it ends up looking something like this:

enter image description here


This assumes you are already within some sort of section that is obviously related to "generating codes". Depending on the rest of your design, you might need to consider making the label specific to code generation, for example:

Minimum length of generated code

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.