6 Replies Latest reply on Aug 21, 2014 6:05 AM by philmodjunk

Entering % values

Title

Entering % values

Post

I am new to file maker and was wondering if there was a way of setting a data entry field that requires a percentage amount to be able to accept a user entering 10 for 10% rather then entering 0.1.

• 1. Re: Entering % values

Yes.  I do this frequently.  Set the field to NUMBER.  After clicking CREATE, Click on OPTIONS.

Click on CALCULATED VALUE.

Define the calculation as Evaluate ( self / 100 )

Click OK.

Uncheck DO NOT REPLACE EXISTING VALUE OF FIELD

Click OK.

• 2. Re: Entering % values

Thanks for that works perfectly

• 3. Re: Entering % values

I love that technique.  I use it frequently.  Also lets you do math in a number field.  Evaluate (self)

Then you can type math expression and hit ENTER to see the result.

• 4. Re: Entering % values

I've adapted somebody else's idea and built an on screen calculator, with buttons for the digits and operators, adds to a string in a field, then hitting = runs a tiny script to evaluate the string and pop it into a answer field

• 5. Re: Entering % values

If you want to allow either a fraction or a whole number entry you can try a formula like this:

If ( Self  <  1 ; Self ; Evaluate ( Self / 100 ))

Of course, this only works for whole number percentage values.  If your percentage value is less than one, this won't work.

• 6. Re: Entering % values

I've adapted somebody else's idea and built an on screen calculator, with buttons for the digits and operators, adds to a string in a field, then hitting = runs a tiny script to evaluate the string and pop it into a answer field

Something like this perhaps: https://dl.dropboxusercontent.com/u/78737945/CalculaterPopoverDemo.fmp12

But a variation of the original auto-enter calculation that you might consider is one that checks to see if the value is less than one. If the value is less than one, return self to leave it as it entered, if it is greater than one divide by 100 as already shown in this thread.