sal88 Posted September 28, 2007 Share Posted September 28, 2007 Hi how do you include a zero in calculation fields? eg. 0.4 displays as .4 TIA Link to comment Share on other sites More sharing options...
Lee Smith Posted September 28, 2007 Share Posted September 28, 2007 The calculation function strips leading and trailing zeros. You can make it display the leading zero, if you format your number field as Link to comment Share on other sites More sharing options...
Lee Smith Posted September 28, 2007 Share Posted September 28, 2007 (edited) The Forum cut my post short. (?) The whole post continues on to say The calculation function strips leading and trailing zeros. You can make it display the leading zero, if you format your number field as currency, and remove the currency. Note the circle areas. Other than the 2 places, which you might have more or less selected. HTH Lee Edited September 28, 2007 by Guest Link to comment Share on other sites More sharing options...
sal88 Posted September 28, 2007 Author Share Posted September 28, 2007 thanks but the problem is (which i should have stated) that the calculation field also contains text Link to comment Share on other sites More sharing options...
Lee Smith Posted September 28, 2007 Share Posted September 28, 2007 (edited) That is a whole different situation. Can you give an example of how this data in the text field looks (i.e. the text and numbers combined)? And the Calculation. Copy and paste here. Lee Edited September 28, 2007 by Guest Link to comment Share on other sites More sharing options...
sal88 Posted September 28, 2007 Author Share Posted September 28, 2007 yeah its basically: [number field] & " text here" Link to comment Share on other sites More sharing options...
Lee Smith Posted September 28, 2007 Share Posted September 28, 2007 (edited) If the number is entered as 0.4 in the number field, 8.5 will keep that format as is, when used in a calculation as you have shown. I don't see the problem here, unless the 0.4 was the result of a second calculation? Lee Edited September 28, 2007 by Guest Link to comment Share on other sites More sharing options...
sal88 Posted September 28, 2007 Author Share Posted September 28, 2007 yes it was the result of a second calculation, sorry its friday im barely awake! Link to comment Share on other sites More sharing options...
comment Posted September 28, 2007 Share Posted September 28, 2007 This can be simple or difficult - depending on the expected results of your calculation (positive/negative/zero, needs rounding or not). The simplest method is to use a merged field in a text object, instead of a calculation. This can be formatted just a like a field. Link to comment Share on other sites More sharing options...
sal88 Posted September 28, 2007 Author Share Posted September 28, 2007 i suppose the more difficult method is to have an if operator whereby if the left most digit is a period then it will at a zero to the start? Link to comment Share on other sites More sharing options...
comment Posted September 28, 2007 Share Posted September 28, 2007 But that would break with a negative fraction, e.g. "-.25". By difficult, I meant something like this: http://www.fmforums.com/forum/showpost.php?post/152886/ Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 6146 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