ERROR Validation Error BC30978: Range variable I 'dtcontracts hides a variable in an enclosing block or a range variable previously defined in the query expression

Getting below error while converting windows legacy code to windows compatibility

ERROR Validation Error BC30978: Range variable ‘dtcontracts’ hides a variable in an enclosing block or a range variable previously defined in the query expression.

Any suggestions please let me know

Thank you…

@Rupali_Shinde,

You have dtcontracts declared twice in a workflow. Delete the inner scope and this should be resolved. Try searching for the variable dtcontracts in your project.

Thanks,
Ashok :slight_smile:

Hi Ashok ,

I have checked the same but not resolved and variable are using only one time in the project.

@Rupali_Shinde,

Ok that’s weird. Try analyzing the project through Studio analyzer. If the variable is really duplicate, it should reflect in there.

Thanks,
Ashok :slight_smile:

Hi Ashok ,

After analyzing the project the variables shown in the that particular project but after removing the variables still it’s showing same error.

Thank you…

@Rupali_Shinde,

Double click on the Analyzer warning to open the exact location where the variable is declared and then delete from there.

After deleting variables it showing the variables is not declared and after adding those variables same issue occurs.

@Rupali_Shinde,

After deleting, find the variable again and you should get one declared, delete that as well. Once deleted, then declare it with correct scope.

It’s working now thanks

1 Like

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