You are viewing limited content. For full access, please sign in.

Question

Question

Workflow Calculator Error Invalid Numeric Value.

asked on November 21, 2018 Show version history

I need to do a simple compare on a calculation I have done and an existing field value.

Here is the Token Calculation:

FIXED(((%(RetrieveFieldValues_Reg Hours_All#[%(LaborRows_Iteration)]#)+(%(RetrieveFieldValues_OT Hours_All#[%(LaborRows_Iteration)]#)*1.50)+(%(RetrieveFieldValues_DT Hours_All#[%(LaborRows_Iteration)]#)*2.00))*%(RetrieveFieldValues_Labor Rate_All#[%(LaborRows_Iteration)]#)),2)

Where:

Reg_Hours = 5.00
OT Hours = 0.00
DT Hours = 0.00
Rate = 55.00

Result:  275.00

I need to Compare to an Amount field with the value:

275.00

When I run the workflow I get the message:

11/21/2018 2:42:04 PM Labor Calculator Invalid Numeric Value: Expression: FIXED(((%(RetrieveFieldValues_Reg Hours_All#[%(LaborRows_Iteration)]#)+(%(RetrieveFieldValues_OT Hours_All#[%(LaborRows_Iteration)]#)*1.50)+(%(RetrieveFieldValues_DT Hours_All#[%(LaborRows_Iteration)]#)*2.00))*%(RetrieveFieldValues_Labor Rate_All#[%(LaborRows_Iteration)]#)),2)

I have tried to run this without the FIXED().  But the Result Value returned is:

275.0000

And apparently that does not equal

275.00

 

0 0

Answer

SELECTED ANSWER
replied on November 21, 2018

If you use an "Assign Token Values" activity and create two new tokens for your calculated and amount values, while making sure these new tokens are using only the "Number" token tag, are you then able to compare the two tokens against each other and get a True result that they are equal?

I did a trivial test in Workflow 10.2.1 where I created two new tokens with hard coded values of 275.0000 and 275.00. Both tokens are using the "Number" token tag and when I compare them to each other, Workflow does recognize that they are equal.

1 0
replied on November 21, 2018

Ah yes that seems to do it.  Setting the value to number in the calculation step didn't seem to affect it being a string value.  But setting it into the Token Value as a number after the calculation works.

Thank you!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.