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

Recommended Posts

Posted

How do I take a number field and make it add three other fields and ALWAYS be three a three digit number.

For example: if the field adds 10, 15, 15, the answer in the field would be "040"

or if I add 2, 2, 3, the field would contain "007"

Thanks for your help

Lester

Posted (edited)

I found how to calculate a field to be the number I want. Calc is: Right("000" & Int(Big Total),3) &"." & Middle(Round(Big Total-Int(Big Total),2) & "0",2,1) Works great!

BUT I loose this formating when I add the field to to another field in a new calculation

Field A & Field B & Field C

How do I keep the my calc from loosing the leading zeros in a new calculation?

Thanks

Lester

Edited by Guest
Posted

I merged your two posts as they amounted to a Double Post. Please do not start a thread when asking followup questions, just reply to your original thread.

As you can see, I posted a similar calculation that you used. I'll see if I can spot the problem.

Lee

Posted

In order to pad the 0s in your total, the field has to be text field in v6. If you then use that field in another calculation, the calculation engine will strip out the leading zeros (and trailing zeros after the "." also).

You migh try adjusting your final calculation so that the padded 0s are put into it (too) for the final result.

HTH

Lee

Posted

Hi Lester,

If you are adding numbers and wanting numeric results then why are you padding them with beginning zeros? As Lee says, numbers don't HAVE beginning zeros. You will continually struggle with this throughout your solution (converting all numbers using additional calculations); as you are realizing now. I can think of no reason that true numbers should be padded with leading zeros.

LaRetta

Posted

Not to mention that the calculation will provide unexpected results if you have a number with a decimal in it.

Lee

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