I need help in fixing an error I'm seeing. Can you provide guidance?
iif([Total Days at Integrator's Warehouse]<=30,
[Days at Integrator's Warehouse for Calc Period]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC],
iif([Total Days at Integrator's Warehouse]>30 and [Total Days at Integrator's Warehouse]<181,
[Days at Integrator's Warehouse for Calc Period]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC],
iif([Total Days at Integrator's Warehouse]>=181,
((([Days at Integrator's Warehouse for Calc Period]-[days for higher rate]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC]+[days for higher rate]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC]))),0))
Solved! Go to Solution.
Prueba esto:
iif([Total Days at Integrator's Warehouse]<=30,[Days at Integrator's Warehouse for Calc Period]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC],
iif([Total Days at Integrator's Warehouse]>30 and [Total Days at Integrator's Warehouse]<181,[Days at Integrator's Warehouse for Calc Period]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC],
iif([Total Days at Integrator's Warehouse]>=181,
(
(
(
[Days at Integrator's Warehouse for Calc Period]-[days for higher rate]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC]+[days for higher rate]*(0.XXX/366)*[Unit PO Material Price]*[Qty for CoC]
)
)
),0)))
When I try re-running the workflow, I still get a parse error at char(605):malformed if statement (expression #1). I see that the error is tied to this section of your recommendation:
(
(
(
[Days at Integrator's Warehouse for Calc Period]-[days for higher rate]*(0.066/366)*[Unit PO Material Price]*[Qty for CoC]+[days for higher rate]*(0.095/366)*[Unit PO Material Price]*[Qty for CoC]
)
)
),0)))
I also see this message:
Formula: tried to apply numeric operator to string value
All these fields are numerical?
Hi @fagoagaf
The formula fix that @dougperez provided is correct. The reason you are still getting an error is because one of the fields in your formula is stored as a string and needs to be converted to a numeric type (double, int64, etc.). Once you correct this, the formula will work as expected. Just drop a Select tool on the canvas before the Formula tool and flip the data type over to Double.
Hope that helps
Cheers!
Phil
Yes. They are.
Can you show the select tool before this formula?
@fagoagaf - as I stated before, one of your fields is not a numeric field but is instead a string. The error you are receiving can only happen when this applies.
Based on your screenshot, the field in question is [days for higher rate]
Here is a screenshot where I was able to recreate the same problem because this field is stored as a string.
When I change this field to a double, the error goes away.
Update you field type and you should be good.
Thanks!
Phil