Validation error in Text string

When I run the main I get the error: Error ERROR Validation Error Compiler error(s) encountered processing expression ""First Value is: " & First_Input_Value.ToString & Environment.NewLine & “Second Value is: " & Second_Input_Value.ToString”.
‘Second_Input_Value’ is not declared. It may be inaccessible due to its protection level.
‘First_Input_Value’ is not declared. It may be inaccessible due to its protection level. Main.xaml

Any Idea what Im doing wrong here?

Hi @Anna_Kristin_Hjaltalin_Ag ,

Could you check if the variables are declared in the variables Panel ? Also, Check the Scope of the variable, if it is needed in other Scopes then you would require to change the Scope of the variables accordingly.

It is declared and in the correct scope:

kindly note the case typos at the second input value variable

Thank you! Fixed, still same error :slight_smile:

if the issue still remains, then debug stepwise and trace the variables within the debugging panels

Hi @Anna_Kristin_Hjaltalin_Ag

  1. Variable Declaration : Make sure you have declared these variables before trying to use them in your workflow.
  2. Variable Scope: Ensure that the variables are declared in a scope that is accessible where you’re trying to use them. Variable scope can be restricted to specific activities or sequences, so ensure that the variables are declared at a scope level where they are accessible throughout your workflow.
  3. Check Variable Names: Make sure that you are using the correct variable names, including capitalization. Variable names in UiPath are case-sensitive.

Hope it helps!!

It means exactly what it says. In the scope of that activity, variables Second_Input_Value and First_Input_Value don’t exist.

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