macmekker Posted August 11, 2004 Posted August 11, 2004 Hi. I have problem I can't get around... I have a numeric field in db file A, in which I enter "0,5" (using "," instead of "." before the decimals is the norwegian standard - set in the Mac OS system settings) Then I have a calculation field in db file B which is just: relationship::numeric field. Here the zero is gone: ,5 It comes back if I set the numeric format to fixed decimals of cause, but I don't want that. Because if I enter 36 - I don't want in to display 36,00 I have tried to set the calculation field in db file B to turncate(relationship::numeric field, 2) and round(turncate(relationship::numeric field, 2), 2) and some other trix, but nothing helps. Now I'm out of ideas. Anybody else with this experience? And a solution?
Vaughan Posted August 12, 2004 Posted August 12, 2004 Format the field on the layout (Format menu, Number format command) to be decimal.
macmekker Posted August 14, 2004 Author Posted August 14, 2004 Thanks, but as I said in the text - I don't want to do that. Because if I have a hole number - as 36 - I don't want it to show 36,00 or 36,0 - just 36 What I have done in the meantime is an extra calculation field for displaying only: if(numeric field<1, "0" & numtotext(numeric field), numtotext(numeric field)) But this way does not seem the right way to do it...
-Queue- Posted August 14, 2004 Posted August 14, 2004 What if you format the number field to 'leave data formatted as entered'?
RalphL Posted August 15, 2004 Posted August 15, 2004 I don't think formatting the number as a decimal will produce a leading zero. You text calculation has a flaw if you can have numbers less than zero.
-Queue- Posted August 15, 2004 Posted August 15, 2004 It won't produce a leading zero, but it doesn't need to. The zero has already been entered. I haven't tested it, but it seems like it should work.
macmekker Posted August 16, 2004 Author Posted August 16, 2004 Thanks guys, but I'm afraid this is an effect of the fact that filemaker always cut leading zeros in a calculation. And that I therefor must have my text calculation for display purposes... (?) to Queue: This was one of the things I tried first - and no - it doesn't work - in file B. In file A the zero is in it's place. In file B the field is a calculation, so I guess no data is entered to be "left as entered" to RalphL: Yes formatting the number as decimal does produce the leading zero, but trailing zeros as-well. And I don't want that... And I ignored the flaw in this case - as the field represents weight on cargo.
-Queue- Posted August 16, 2004 Posted August 16, 2004 I think your If calculation should do it, but will you have any negative numbers for which you're not accounting here?
macmekker Posted August 17, 2004 Author Posted August 17, 2004 Hi Queue. You have probably seen my previous answer by now, but no - as the field represents weight on cargo - there shouldn't be negative numbers. (I would hate to be on the airfreight plane generating negative weight...) How can this happen: You posting a reply at 11:12 AM and being listed under mine postet at 12:23 AM. Is it local time for the sender? Then it ..... ooohhh I think i've just been a stupid scandinavian: 12:23 AM is actually 00:23 - so you had seen that the field represents weight on cargo. Sorry. Don't mean to be a wiseguy, so the short answer: No there will not be any negative numbers...
-Queue- Posted August 17, 2004 Posted August 17, 2004 Okay, then you might as well go for the calculation and see how it works for you. You almost had me on the time difference. I think that's a good sign it's time for bed.
Recommended Posts
This topic is 7665 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