kmsitall Posted December 5, 2002 Posted December 5, 2002 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.
CobaltSky Posted December 5, 2002 Posted December 5, 2002 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.
Vaughan Posted December 5, 2002 Posted December 5, 2002 Format the field on the layout to display 1 decimal place using the Format Number command.
CobaltSky Posted December 5, 2002 Posted December 5, 2002 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.
kmsitall Posted December 5, 2002 Author Posted December 5, 2002 That worked perfectly Ray! Thanks so much for the quick help. Kathleen
Recommended Posts
This topic is 8361 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 accountSign in
Already have an account? Sign in here.
Sign In Now