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

Question

Question

Error converting data type nvarchar to int

asked on February 25, 2015

So I have a Number Field on a Form that I am trying to use in Workflow that calls a SQL Stored Procedure.  On the Form, the range is restricted from 5 to 100.  In the Workflow I need to divide this number by 100 and then use it as a Parameter for the SQL Stored Procedure.  All other fields I'm using from the same Form do not experience any issue. [Forms: 9.2.0.908 -- Workflow: 9.1.0.328]

However, I keep getting "Error converting data type nvarchar to int" no matter what I try.

Will someone point me in the right direction?

"Parameter Values" I've tried with various "Type" options (Default, Decimal, Int16, Int32, Int64, String):

  1. %(ForEachRowA_Interest)
  2. %(ForEachRowA_Interest)/100
  3. %(TokenCalculator_Interest)

 

Workflow Custom Query

Workflow

0 0

Replies

replied on February 25, 2015

Is the expected value in the procedure supposed to be of type int? Your values, after dividing the form value by 100 are in the 0.05 to 1 range, so none but the last one are integers.

0 0
replied on February 25, 2015 Show version history

Yes, the expected value is of int.  I thought that too, but trying to pass the the Form field without dividing by 100 results in the same error.

 

0 0
replied on February 25, 2015

If the value is an int, you can set the parameter type as Int16 in Workflow. But your value is not going to be an integer if you divide it by 100.

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

Sign in to reply to this post.