Project Level Variable

How can we set a dictionary type global variable using this option. Is that a possibility?

Hi, I am not able to access the global variable value in another workflow file. It is showing null value in other workflow. Can you please share some example xaml file?

Hello, You can take the reference from the link. Let me know if you still face any issue

@Manoj_Batra I have looked into this page only and followed same steps but the value of variable in other workflow file is showing null. Attached are the screenshots.

are you doing it in one go. I am setting and getting in one run? This global variable holds the value for a single session only.

@Manoj_Batra What do you mean by one run here. So, I had set the variable in one file and trying to access that variable using Get in other file and I am running the second file in which I had specified Get. Do I need to invoke the workflow having set in other file?

hey please create Argument for that so you can use all the project

okay. Let me rephrase it again. you need to run both file as a part of single execution which means the process would execute both files in a single step where the process will first set the variable value and then move to the next page and fetches the value there(Which we normally do in RE-framework, the state transition). If you stop the process in between(before fetching) and try to run the process again to get the data, it will not return you anything as once you stopped the execution, all the reference to the variable will be gone.

Let me know if you still face any issue, we can jump on a call to sort this out

@pawanrajpurohit Argument will not solve the purpose as you need to declare the argument in every workflow if you need to pass the data from A to B to C. whereas with the help of this activity, you can declare it once and use anywhere. There is no need to create extra argument for that

@Manoj_Batra Thanks for clarifying it. That’s what was my guess as well when it didn’t work.

1 Like

As a newbie to UiPath I’m amazed that project variables are (still) not available in UiPath. I’ve been using Testcomplete a lot and there they are available. This seems to be a MUST HAVE

…so how would I store a password that’s need project-wide???..across all xamls??

testcomplete project variables

Hi @Daniel_de_Winter

1.You can store your password in orchestrator, by using Get Asset activity you can get the password from orchestrator.
2.In Main xaml create a Get Asset activity and save output in a variable.
3.In Other xamls by using arguments you can get the password variable.

I hope it helps!!

Global variables are available and have been for quite some time. You add them via the Data Manager pane in Studio.

I personally think they are not worth using, I have not seen a situation where they are more advantageous over just passing the variable around as they are annoying to use.
The one way I could see them being handy would be to allow easier changing of a data type preventing you from needing to change a bunch of invokes, but even that isn’t easier really since you cannot change the data type of a global variable once it is set.

Hello @lrtetala

When using the Get Asset activity, I run into this issue:

any idea?


…found it. You have to use the Get Credential activity