Skip to main content
Question

Add leading zeros to Form ID # to make even length

  • March 23, 2017
  • 0 replies
  • 212 views

I am using the following formula to add leading zeros to a request # field I created on a form.

"Request"&Right("000" & ToText([Record ID#]),5)

I would like to limit the number of characters to 11 and have the leading zero's be consumed as the record id # increases.

For example:

"Request00012" should be "Request0012"

Is there a way I can modify the field or form to do this?

This topic has been closed for replies.

Request"&Right("0000)" & ToText([Record ID#]),4)

  • Registered
  • March 23, 2017
You are going to have to account for growing numbers.

Something like...
If([Record ID#]>99, ...
If([Record ID#]>999, ...
If([Record ID#]>9999, ...
etc.

Corrected formula

"Request"&Right("0000" & ToText([Record ID#]),4)