i have changed nothing at all just copy and past. also this is the code inside the assigne activity.
(From r1 In GlobalVariablesNamespace.GlobalVariables.dtDataTable1.AsEnumerable()
Join r2 In GlobalVariablesNamespace.GlobalVariables.dtDataTable2.AsEnumerable()
On r1(“Company”).ToString() Equals r2(“Code”).ToString()
Select r2.Field(Of String)(“Company Name”)).FirstOrDefault()
the automation work normally at the first PC but once i copied it this is the problem.
Try typing this query instead of copy pasting. Sometimes UiPath Studio behaves weird.
(from r1 in GlobalVariablesNamespace.GlobalVariables.dtDataTable1.AsEnumerable()
join r2 in GlobalVariablesNamespace.GlobalVariables.dtDataTable2.AsEnumerable()
on r1.Field<string>("Company") equals r2.Field<string>("Code")
select r2.Field<string>("Company Name")).FirstOrDefault()
I have just refactored your LINQ
Used Field<string> instead of r1("Company").ToString() and r2("Code").ToString() for better type safety and readability.
Since you are using Studio X please remove the Assign acitivty and use Set Variable Value activity and retype the syntax. This should solve your error.