Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Displaying the zero in 0,5

Featured Replies

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?

Format the field on the layout (Format menu, Number format command) to be decimal.

  • Author

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...

What if you format the number field to 'leave data formatted as entered'?

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.

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.

  • Author

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.

I think your If calculation should do it, but will you have any negative numbers for which you're not accounting here?

  • Author

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...

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. Yawn.gif

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.