Int Value Can't assign in the Orchestor Why ...?

I Assigned 2 integer Value in Process Workflow but i don’t why i was can’t take the integer Value

Hi @S_Yuvaraj

The error occur because in Process workflow argument is of type Int32 But you are passing a String value from the caller workflow
Ensure the argument types match on both sides or explicitly convert the String using CInt() / Convert.ToInt32() before passing it.

Hope it’s help
Thanks & Happy Automations

1 Like

Hi @S_Yuvaraj ,

This issue happens because you’re passing a constant value (2) to an argument that is not an In argument. In UiPath, only In arguments can accept direct values. If the argument is Out or In/Out, you must pass a variable.

Also make sure the argument type in both workflows is Int32 and click Refresh Arguments after changes.

Change yourVariable to CInt(yourVariable)

1 Like

Hi @S_Yuvaraj

You have defined the argument as an Integer in the process workflow, but you are passing a String variable to it. As a result, the system throws an error indicating that it is unable to convert a string to an integer.

To resolve this issue, convert the string value to an integer using CInt(Variable) before passing it.

Hope it helps!!

1 Like

this is due to incorrect datatype.

You are mapping a string variable to a int argument. Make sure datatypes are same.

Typecast your int variable to string and use it like Cint(variable)

1 Like

i have a doubt now in that process workflow is defaultly assign string but i’m declare the variable int32 it is correct or not , and if i want to change the string to int how i know i will convert the string to Cint of but i want to know if any posible for Chage the default data type

@S_Yuvaraj

In UiPath, many activity fields are String by default (like Assign, Input, or arguments).
1.You cannot change the default data type of these activity fields.
2.Declaring your variable as Int32 is correct.
But you cannot directly assign a String to it.
3.To assign a String to an Int32 variable, you must convert it using:

Integer.TryParse(strVar, intVar)
1 Returns True if conversion is successful, False if not.
2 intVar will contain 0 if conversion fails.
If this solution helps you please mark as solved

Thanks & Happy Automations

@S_Yuvaraj if solution works for you please mark as solved so thread will be closed

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.