Skip 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.

How to format a number preceded by a zero

Featured Replies

I have searched the manual and here for help with this and strangely, I found nothing. I tried several approaches to format the field within the script and the results.

I have a serial number produced with a Loop and want the result if < 10 to be preceded by a zero for sorting purposes. (I believe FM, like spreadsheets, requires a zero before single digits.) The script, i.e., the bcooney/Daniele script, follows below.

Thanks,

Leonard

Picture_6.jpg

If the field is a pure number, then a 0 is not needed to sort. However, if you have text characters in the field too (can't tell from the description), then the field will need to be Text, not Number.

Lee

Is this a duplicate post?

Edited by Guest

  • Author

Thanks for that, Lee.

Leonard

Lee wrote: "If the field is a pure number..."

I think Lee meant that the field definition needs to be set to number, rather than text. Text fields get sorted alphabetically (1, 10, 2, 20 etc) whereas number fields sort numerically (1, 2, 10, 20 etc).

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.