Would it be possible to use a variable as part of a filepath for a folder in Switch?
I have a fixed folder structure for all costumers. The only difference is, that the top folder would be named after the costumer. All files are submitted through a Submit Point and the name of the costumer (which equals the name of the top folder) is supplied as metadata.
I have a specific flow that will be duplicated for each costumer and at different point in this flow I use folders in that same folder structure. Let's say I have this folder structure: Name/Input/Datasource. Rather than change each flow to point to the correct folder, it would be really handy if I could define "Name" as a variable grabbed from the metadata.
I use variables for paths in "Inject Job", but the same syntax doesn't seem to work for a folder path. Any ideas?
Using variables in filepath
Re: Using variables in filepath
Sounds like set hierarchy and submit hierarchy would work for you. Within set hierarchy, you can enter variables.
Chat: open-automation @ gitter
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Code: open-automation & dominickp @ GitHub
Tools: Switch, Pitstop, EPMS, Veracore, PageDNA, SmartStream, Metrix
Re: Using variables in filepath
I don't think I understand how that would help? What I want is to be able to set the path to a specific folder in my flow, by using variables.
Re: Using variables in filepath
But if you set the hierarchy and then point it to the root-folder there you want your unique folder, then you get the correct folder structure there? Or is I missing something?Terkelsen wrote:Let's say I have this folder structure: Name/Input/Datasource. Rather than change each flow to point to the correct folder, it would be really handy if I could define "Name" as a variable grabbed from the metadata.

Between jobs!
Re: Using variables in filepath
Hi,
Defining a Hierarchy seems also a good idea to me because you can have you "all the clients" folder basis and create the "per client" subfolder structure based on the metadata. Once that done, you can have another flow that would use a hierarchy entry point on the "all the clients" folder and retain the hierarchy path so you can dispatch the jobs between the appropriate flows.
Unless I misunderstand the request.
Loïc
Defining a Hierarchy seems also a good idea to me because you can have you "all the clients" folder basis and create the "per client" subfolder structure based on the metadata. Once that done, you can have another flow that would use a hierarchy entry point on the "all the clients" folder and retain the hierarchy path so you can dispatch the jobs between the appropriate flows.
Unless I misunderstand the request.
Loïc
- TheCaptain
- Member
- Posts: 62
- Joined: Mon Jan 18, 2016 4:22 pm
- Location: London
Re: Using variables in filepath
I'm wondering if he means rather than creating Folders, instead he's looking to direct traffic to specific folders that already exist but are nested within a consistent Folder Structure.
So whether the top level folder is called; Nike / Adidas / Puma, the lower levels are always named the same i.e Proof / Artwork / Data.
In this way he needs a variable to point to the lower level of a unique top level.
If this is the case, I believe hierarchy can still complete this task but you would need to specify Regular Expressions style layer arguments to pinpoint a specific item.
This https://www.cheatography.com/davechild/ ... pressions/ may help...
So whether the top level folder is called; Nike / Adidas / Puma, the lower levels are always named the same i.e Proof / Artwork / Data.
In this way he needs a variable to point to the lower level of a unique top level.
If this is the case, I believe hierarchy can still complete this task but you would need to specify Regular Expressions style layer arguments to pinpoint a specific item.
This https://www.cheatography.com/davechild/ ... pressions/ may help...