String to Inte32 conversion

Hi All,

I am trying to build a DataTable and one of the columns is Employee Number. I tried Person (as the variable) and the Value as Cint(“Employee Number”) but that didn’t work.

I am now trying to convert the string to Inte32. The Variable is still (Person) and the value is Convert.ToInt32(“Employee Number”)

That doesn’t look right but am lost to what I need to do to get this to work?

Hi @csanders ,

Can you perhaps share a screenshot of the workflow, where you have tried to assign the value?

It will help us to understand better and provide a quick resolution.


i assume you are passing variable then no need to use double quotes

if you are passing from datatable then you have define like dt.row(rowindex)(columnindex/name) without double quotes


I am trying to see if the Employee Number they have provided is on the HeadCount report.

Hi @csanders

Can you try this-

  1. Create a string variable called employeeNumber and assign it the value of the employee number.
  2. Create an Int32 variable called employeeNumberInt
  3. Use the Assign activity to convert the string to an Int32, like this: employeeNumberInt = Convert.ToInt32(employeeNumber)

To add this value to a DataTable, you can use the Add Data Row activity, like this:

  1. Create a DataTable variable called dt
  2. Use the Build Data Table activity to define the columns of your DataTable, including the Employee Number column.
  3. Use the Add Data Row activity to add a row to your DataTable with the values of your variables: dt.Rows.Add({employeeNumberInt, “John”, “Doe”})



then use filter datatable activity

and say the employeenumber column emp_no then in configure filter on left side igve "emp_no" and on right pass the variable with required employee number …try with passing as string EmpNoVar else try with Cint(EmpNoVar)

then if filteredtdt.Rowcount.Equals(0) then not identified else found