Version 2018.4.1 - DataTable variable
Carefully examine your code at the reported error location for two variables with the same name (but different scopes).
In my case, I had two datatable variables with the same name (ServOrd) and overlapping scope at the location of the error. I initialized and assigned ServOrd.Scope1 and later referenced ServOrd.Scope2.
1 Like
Hi
This error usually occurs when the activity with variable has no value in it
Kindly check once with the value of the variable associated with the activity where this error occured
Cheers @phillip.dickinson
1 Like
How to check whether the variable has value or not
1 Like
indra
(Indra)
September 27, 2019, 1:57pm
4
@Sweety_Girl Which variable you needs to check.
1 Like
indra
(Indra)
September 27, 2019, 2:01pm
6
@Sweety_Girl Follow below condition if(Datatable.Rows.Count=0)
{
||Empty
}
Else
{
||Non Empty
}
1 Like
While it entering if itself it throws object reference error
1 Like
indra
(Indra)
September 27, 2019, 2:10pm
8
@Sweety_Girl Can you share the screenshot of the if condition
1 Like
in if
Dt.rows.count=0
is being checked
1 Like
indra
(Indra)
September 27, 2019, 2:16pm
10
1 Like
Sweety_Girl
(Sweety_Girl)
September 27, 2019, 2:18pm
11
Is it same way for other datatypes like string
1 Like
indra
(Indra)
September 27, 2019, 2:31pm
12
@Sweety_Girl For other data types it is different
1 Like
Sweety_Girl
(Sweety_Girl)
September 27, 2019, 2:32pm
13
Can you tell me how for string?
1 Like
indra
(Indra)
September 27, 2019, 2:35pm
14
@Sweety_Girl String.IsNullOrEmpty(VariableName)
1 Like
beesheep
(Eduardo Bernabe Sacahui Diaz)
September 27, 2019, 2:40pm
15
Hello @Sweety_Girl ,
Thank you for your inquiry.
To maintain the quality of the forum, please provide screenshots and relative information for your question.
String.IsNullOrEmpty(VariableName) or
VarName <> “”
If @indra or myself answered your question please mark it as complete and don’t forget to like the answer.
regards
2 Likes
Sweety_Girl
(Sweety_Girl)
September 27, 2019, 2:45pm
16
As per your request like is provided and the solution is marked by the person who created that topic…
2 Likes
beesheep
(Eduardo Bernabe Sacahui Diaz)
September 27, 2019, 2:51pm
18
Happy automation Sweety Girl.
Come back soon!!!
2 Likes