wattmhite Posted December 18, 2017 Posted December 18, 2017 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
NLR Posted December 18, 2017 Posted December 18, 2017 (edited) 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 December 18, 2017 by NLR
siroos12 Posted December 18, 2017 Posted December 18, 2017 (edited) 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 December 18, 2017 by siroos12
Recommended Posts
This topic is 2867 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