Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 5775 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted (edited)

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
Posted

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?

Posted

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.

Posted (edited)

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
Posted

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.

This topic is 5775 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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