Jump to content

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

Recommended Posts

Posted

Novice has question. (Mac OS 9.2, FMPro v.6)

I'm using two fields to show height and width dimensions in centimeters.

I then use a calculation to combine the two numbers as a descriptive phrase: "45.1 x 33.1 cm".

I'm using ROUND to limit the decimal to one place. However, when the decimal rounds to 0 (zero), the 0 is dropped in the calculation result. (e.g., 22.02 shows up as 22, but I need it to show as 22.0). I'm just not getting how to do this.

Thanks in advance.

Posted

Try:

Round(Height, 1) & Case(not PatternCount(Round(Height, 1), "."), ".0") & " x " & Round(Width, 1) & Case(not PatternCount(Round(Width, 1), "."), ".0") & " cm"

Where your original number fields are called Height and Width respectively, and the calculation result type is specified as text.

Posted

Format the field on the layout to display 1 decimal place using the Format Number command.

Posted

I'm afraid that won't work in this case, Vaughan.

kmsitall is referring to a calculation field which is required to return the text phrase: "45.1 x 33.1 cm".

Number formats, including fixed decimal places cannot be applied to text fields, including text calculations. Conversely, if the above calculation result type were set as number, and a decimal format applied, the field would display as 451331.0 - which is also not helpful.

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