Modern folder relative path to define in config

Hi I am having a question regarding how to define the folder paths in a flexible way. Here is my question. I have modern folders defined as “Dev/Client/BusinessUnit/Accounting” and “Test/Client/BusinessUnit/Accounting” in my dev orchestrator. In the prod orchestrator i have the modern folders defined as “Prod/Client/BusinessUnit/Accounting”.
So how can i define the folder path in my config file that works for all the three environments, without changing it each time?
More like a dynamic folder path like
FolderPath → */Client/BusinessUnit/Accounting"

Is there a way to define it in config?

Hi @pratyusha_gandham1,

You would need an identifier to say which path to follow. You can add “/Client/BusinessUnit/Accounting” to a variable in your code or specify it in the config, but you need something that will decide whether it’s using “Dev”, “Test” or “Prod”.

@pratyusha_gandham1

have a look on the formal docu:

give a try on:
define an Asset reflecting the environment - stageKey
retrieve the asset in advance
and use it e.g. String.Format(“{0}/Client/BusinessUnit/Accounting”,yourAssetVar)

1 Like

give a try on:
define an Asset reflecting the environment - stageKey
retrieve the asset in advance

Can you please elaborate on this? if am creating a new asset for the root folder that would be under one of the following root folder’s right? i.e., dev, prod, test.

in general the asset has to be defined on folder level. Maybe you can share some details on the folder structures of the different Orchestrators. Thanks

We deal with this directly in script and config.
In script we have variable System that can have PROD/DEV/TEST (in your case).

Than, in config we have:
Orch_FOLDER_PROD |Prod/Client/BusinessUnit/Accounting
Orch_FOLDER_DEV | Dev/Client/BusinessUnit/Accounting
Orch_FOLDER_TEST | Test/Client/BusinessUnit/Accounting

Then, in orchestrator activities, in properties Orchestrator folder path you can use config(“Orch_FOLDER_” + System).ToString and solved. You just need to always change value of System variables and it is quite flexible. You can use this approach for other cases when certain value changes per system.

Hope this helps.