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 6166 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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! :

Posted

There's also the "old school" way:

Right( "0000" & P# ; 4 )

But Michael's way wins for elegance.

Posted

...or

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

This topic is 6166 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.