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.

Limit number field to 0 decimal places

Featured Replies

Is there a way within filemaker to limit the decimal places in a number field to 0? I'm trying to create a field where in if a user enters 100.4 it will set the value to 100 and not allow any decimal places.

I see you can do this in the inspector but I don't think it actually changes the data within the field.

 

Thanks

 

There's a number function called Int (number) which strips off any decimal portion leaving just the integer part. 

 

In your example, Int ( 100.4 ) = 100

Edited by NLR

49 minutes ago, wattmhite said:

Is there a way within filemaker to limit the decimal places in a number field to 0? I'm trying to create a field where in if a user enters 100.4 it will set the value to 100 and not allow any decimal places.

I see you can do this in the inspector but I don't think it actually changes the data within the field.

 

Thanks

 

As NLR suggested, use int () function in a simple script and trigger it on the target field "on save" trigger option. 

 

So the script would be like 

 

Set field [target table::target field ; int (target table::target field)]

 

Or

Set field [target table::target field ; int (Self)]

 

Edited by siroos12

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.