Global variable in a config file

How to set a global variable in a config file in uipath?
I want to make a path dynamic

If you are using the framework, then this is very straightforward. You open the Config.xlsx file from the Data directory and add your name - value pair to the Settings sheet.

To reference your config setting from within the workflow, you use Config(“SettingName”).ToString

NOTE: Replace SettingName with whatever name you gave your setting – keep the quotes

If you aren’t using the framework, then I encourage you to go through the training and learn how to use it.

You can create a new framework project and look in the Init state at the “If first run - read Config file” activity and the Framework\InitAllSettings.xaml workflow to get an idea of how best to do this.

This creates a dictionary of string - object key value pairs that you can reference throughout your project.

2 Likes

Hello,

In my current project we use configuration files to store global variables. We then create an Orchestrator asset to store the configuration file path. This allows us to not have to change our code once we are ready to go live and move the files to a secure location. We keep all our configuration files on a shared drive within a folder only accessible for the Bot controllers once we move the process in production environment.

2 Likes