Showing Varaible is not defined in the current Scope?

Hi all,

I’m trying to dynamically changing the calendar date in UiPath with a variable, but it’s not working. Any ideas?"

image

Thanks

@chandrakala.productanalys

Please check the scope of that variable.

If the variable is also in scope then try deleting that activity and place the activity, then indicate the element and pass the variable in the attributes in selector options window.

Make sure to check the override default value option when pass variable to selector.

It’s working when doing this, already tried this it worked

Regards

1 Like

Hello @chandrakala.productanalys

Assign:
dynamicDate = DateTime.Now.AddDays(7).ToString(“MM/dd/yyyy”)

Type Into:
Selector: (your calendar input field selector)
Text: dynamicDate

Thanks & Cheers!!!

Hi @chandrakala.productanalys

Change the scope of the variable in the variables pane. Also, make sure to check the Override default value option while selecting the variable for the selector.

Done everything, yet error unchanged.

Hi @Chandraleksha_R,

Please find the link: -https://www.youtube.com/watch?v=jArEPLRbFEY

here you can see how to pass the dynamic selector. Go through entire video you get enough idea on how to pass dynamic selector.

Regards,
Techystack

1 Like