Variable Panel Default value Error

I have created a variable called ‘Counter’ in variable panel and set default value as 3. When running automation, i can see that the value i have set in variable changes to 0. Why does this issue happen? I am facing such errors in community version of studio. Still, there are a lot of problems, which actually leads to working more hours even for simple problems. Due to this, i am tired of getting learning from the UiPath academy.

@ajaynnair2,

It must be due to variable scope. Check if you have same variable name declared multiple times in the same workflow xaml.

Counter variable will get reset to 0 in case variable gets initialized.

You can share your code here to review.

I have not used the variable twice and also provided outer Scope for my variable.
I have closed Studio Couple of times and what i saw is the variable whose initialized value is not present

I have used assigned activity to initialize varible and it works perfectly

1 Like

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