Unable to pass the variable in the moderns activity

Hi folks,

I am working on modern activities in that I have to do dynamic selectors and am unable to pass the variables into the sectors am using an object repository.

Please help I am waiting for your reply it’s quite urgent.

Thanks,
Chethan P

1 Like

Hi @copy_writes ,

Check if the below suggestions in the post could help you :

I believe the below was introduced as a work around :

Let us know if you were able to resolve with the above suggestions.

No I have to pass the variable inside the selector and am using the static sector in the selector variable if i pass the variable am getting error "variable or argument is not defined in the current scope in uipath"

and I enable the default value being the bot is clicking on the same UI to which I give the default value.

I dont know how to fix it

@copy_writes ,

Even after receiving the error, If you Click on Ok to save, Does it not save or does it give an Error while Clicking on Ok ?

Is it also possible for you to provide a Screenshot of your Error (Do send even if it is the same as that present in the post).

ok Please check the below screen capture but before I use the classic click activity it is working as expected.


No but i was fail in run time

@copy_writes Can you please validate the selector, by providing some valid default value to that variable

"variable or argument is not defined in the current scope in uipath" This error generally occurs when the variable is not defined within that scope. Did you check the scope of that variable?

No, I given the high level means its use in any scope.

If I use the default value the bot is clicking the value its not going to be a dynamic.

My understanding was, when you’ve passed some default to that variable within the selector, it was working. But, when the value got changed it was not. Correct me if I’m wrong

@copy_writes ,

Could you also check if there is a space between planName variable and Loan ? Seems that there should be a space but there isn’t one.

Let us know if this was already checked and still doesn’t work.

If this is not the case, then try below steps

  • Go to variable panel and search for that variable
  • Provide some default/valid value
  • Go to the selector and make sure you pass the same variable
  • Validate the selector, before validating make sure you open the related browser page
  • Check if the selector is validating or no

Hi @copy_writes

As discussed, Just use the setup for creating dynamic variables.

Please post the sample project here.

If you still face issues please let us know.

Thanks
#nK

1 Like

Yes it is working now

I did the below steps
Step1: creat object repo.
Step2: Create a new variable in the strict selector and use the strict selector only.
Step3: after creating the variable check the default value and whatever the pop came please give YES
Step4: then drag and drop the object repo and it will ask need to creat variable and please give YES.
Step5: run the bot it will work.

@Nithinkrishna Thanks for connecting and explaining step by step.

1 Like

if we create a separate variable it was not taken we have to create in the object Repo

1 Like

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