4 Replies Latest reply on Oct 24, 2013 8:23 AM by philmodjunk

# 1/16 th Imperial Inch Increment rise Calculation Help Needed

### Title

1/16 th Imperial Inch Increment rise Calculation Help Needed

### Post

I have a field with a plus and minus button at the side which I need to be able to add or take away values in the following increments - they represent 1/16's of an Imerial inch

I have no idea where or how to start the Calculation

0

0.0625

0.125

0.1875

0.25

0.3125

0.375

0.4375

0.5

0.5625

0.625

0.6875

0.75

0.8125

0.875

0.9375

1

• ###### 1. Re: 1/16 th Imperial Inch Increment rise Calculation Help Needed

Add a second field named "Increment". Have your button script add 1 to this field each time clicked. (And a second button can subtract 1.)

Increment/16

or

UserEnteredValue + increment/16

so that a user can enter a value in the UserEnteredValue field and then click buttons to increment by 16ths of an inch.

• ###### 2. Re: 1/16 th Imperial Inch Increment rise Calculation Help Needed

Or your button's script could just be:

Set Field [Table::MeasurementFIeld ; Table::MeasurementField + 1/16 ]

• ###### 3. Re: 1/16 th Imperial Inch Increment rise Calculation Help Needed

I thought that was how to do it but it looked too simple. I have found out to my cost that what seems simple usually ends up complicated!

Is it possible also field to display as imperial fractions eg     14 1/16    14 1/4  14 3/4 etc

• ###### 4. Re: 1/16 th Imperial Inch Increment rise Calculation Help Needed

You'll need two fields, one that stores the actual value and one that displays it in mixed number format:

Let ( [ Number = YourFieldHere ;
I = Int ( Number ) ;
N1 = ( Number - I ) * 16 ;
Fract = Choose ( N1 ; "" ; "1/16" ; "1/8" ; "3/16" ; "1/4" ; "5/16" ; "3/8" ; "7/16" ; "1/2" ; "9/16" ; "5/8" ; "11/16" ; "3/4" ; "13/16" ; "7/8" ; "15/16" )
] ;
If ( I ; I ) & " " & Fract
) // Let