If one or more variable under Config file contains the username, then how to avoid changing the username every time manually in config file ,when we are supposed run on multiple machines

Hi Team,

if one or more variable under Config file contains the username, then how to avoid changing the username every time when we are supposed run on multiple machines.---- how can i achieve this using “Get Environment variable activity” or any other way ?

example;

.

nlmanoh1 – is the username in my case… i want to make this dynamic when i run in different user’s machine…

1 Like

usually if we include the variable though in the config with quot on either side it will be taken as STRING
so we can do one thing
in config put until C:\Users\
so that we can concatenate in our process like this
in_config(“DownloadingPath”).ToString+yourusernamevariable.ToString+"\Downloads"

Cheers @KavithaManohar

@KavithaManohar

store your username in Config Excel File
In Studio create a variable having scope Global and read the username by
Datatable.Rows(idx1)(idx2).toString

Regards,
A manohar

But how will handle if there are many paths and so user may change path as shown below;

C:\Users\nlmanoh1\Documents – my config file

C:\Users\NewUserName\Documents\ResultFolder-- If other user wants to add “\ResultFolder” for the above path after replacing his username, then in this case he want to navigate to code to append path “\ResultFolder” in studio right instead of adding “\ResultFolder” directly in config file ?

Can you explain in detail or with a sample .xaml file pls