Yes - that is the fix.

The reason is that your fields were integers and will therefore only
produce an integer result (eg 6/4=1). Adding the 0.0 makes the result
a non-integer and gives the output you're expecting.

The fmepedia page for expressionEvaluator has info on this issue.

Mark

Mark Ireland, Product Support Engineer
Safe Software Inc. Surrey, BC, CANADA
[EMAIL PROTECTED] http://www.safe.com
Solutions for Spatial Data Translation, Distribution and Access


--- In [email protected], "Christopher R. Thorne" <[EMAIL PROTECTED]>
wrote:
>
> Finally got it working.... had to update to the latest build and add 
> (+0.0)with brackets. To get it working.
> 
> (@Value(field1)/(@Value(field2)+0.0))*100
> 
> Chris
> 
> Christopher R. Thorne wrote:
> > Hello,
> > I am trying to use the ExpressionEvaluator Transformers to do the 
> > following math:
> > 
> > &field1/&field2
> > or
> > (&field1/&field2)
> > or
> > (&field1/&field2)*100 getting percent.
> > 
> > in all cases I get zero values even though unless the two values are 
> > equal I get 1.
> > 
> > I made sure that the input values are numbers (10,0) and that the
out is 
> > number (3,2) or (3,4). Still no change.
> > 
> > The Source And Destination file type is ESRI Shape (DBF). Does
anybody 
> > have any suggestion?
> > 
> > Chris
> > 
> > 
> 
> 
> -- 
> GIS Specialist, [EMAIL PROTECTED]
> Ottawa,ON,Canada
> -----------------------------
>






Get the maximum benefit from your FME, FME Objects, or SpatialDirect via our 
Professional Services team.  Visit www.safe.com/services for details. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/fme/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to