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.

leading zeros, Int & Text ?

Featured Replies

I have a calculation that looks like this:

Right ("00" & Int ( shots::shot); 3)

This works fine for num fields.

However, I would like to use num and characters.

"001a" for example.

Can't seem to figure this one out.

The question is not clear: is "001a" the given input, the required output (based on what), or what?

  • Author

sorry for being criptic.

I have a field where users will input values that look like this:

1a

1b

1c

2a

2b

2c

I need to add leading zeros automatically. so, I used a calulation that I found which inserts leading zeros just fine for a numbers only field.

Right ("00" & Int ( shots::shot); 3)

How can I add leading zeros in the case of a mixed

character field?

Here's what I need:

001a

001b

etc.

Thanks

Edited by Guest

Just about the same way:

Right ( "00" & Yourfield ; 4 )

The result should be Text in BOTH cases.

  • Author

Thanks for the reply. That works nicely.

However, when I input a 3 digit numbers

the sort order gets screwy.

001a

0051

0101

051a

Any suggestions?

That is the correct order, textwise. I am not sure what this is all about - it seems you have one field serving more than one purpose, and that is rarely a good thing. Perhaps you should have separate fields for the number and the suffix, and sort by those.

Or perhaps you want the result to be:

001a

051

051a

101

  • Author

Yes, that is the order I'm after

These are shot numbers from a tv shooting schedule.

They look like this when sorted correctly.

008

008a

009

009a

009b

010

010a

010b

I'm starting to feel that my problem is not with the leading zeros calc, but rather with the sorting. Perhaps I need to make a seperate field for the letter increments. Is there a way around this?

Again, I appreciate your help.

Edited by Guest

Well you could use:

SerialIncrement ( "000" ; Yourfield ) & Filter ( "abcdefghijklmnopqrstuvwxyz" ; Yourfield )

to get the above result, but I believe it's best to stick to the "one fact per field" rule.

  • Author

Thanks. I just went with an extra field for now.

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.