Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Juggernaut

GetAsNumber that needs to return at least one zero

Featured Replies

Hi everyone...lost on how to resolve this.

Using the

GetAsNumber ( P# )

to convert (for example) 012345 numbers ("P#" field) to 12345 or 001234 to 1234. This works great.

The problem comes in with some (P#) that are three digits 000123 and GetAsNumber removes all zeroes and shows 123. We need to *always* have 4 numbers (so it should be 0123).

So anything that has three zeroes needs to return 0xxx (to make it a four digit number from six) and everything else just needs to remove the one or two zeroes (xxxx or xxxxx)from the six digits.

Any ideas how to resolve this? Thank you in advance!

Try:

SerialIncrement ( "0000" ; P# )

The result is text - "0123" is not a number.

  • Author

Thanks comment! : I was commenting to my co-worker that this will take my hours to figure out but the guys and gals that do this all the time will know exactly what to do in seconds! :

There's also the "old school" way:

Right( "0000" & P# ; 4 )

But Michael's way wins for elegance.

...or

Right( "0000" & GetAsNumber ( P# ) ; 4 )

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.