06-06-21 04:22 PM
Hello everyone, everything good?
It may seem like a simple tip, but it helped me a lot in extensive processes.
Before approaching the solution I would like to mention the importance of using environment variables in your automations, thus reducing the need to change the code many times just to change a path of a file that is flat inside the stream.
Come on..
I recently worked on a huge process and it had about 30 different folder paths, so basically I needed to have 30 environment variables and that would make it very cluttered and hard to find a path in between 30 variables, so what was the solution?
I created a JSON Structure with two "columns" ID_Name and Path
[
{
"ID_Name":"FOLDER XYZ",
"Path":"PATH HERE"
},
{
"ID_Name":"FOLDER XPTO",
"Path":"PATH HERE"
}
]
And with the action JSON to Collection (skipping JArray) of the VBO JSON Manipulate I was able to convert this JSON to collection.
So like all paths in a collection, I created a filter collection stage, whenever I needed a path, I passed the ID_Name "FOLDER XYZ" as in the example above in the filter and returned a single path that was what I needed with this to be able to have one greater degree of organization within my process without needing to get lost among so many environment variables and by using environment variables I allow the paths to be changed without the need to change anything within my robotic flow.
Link to VBO
JSFiddle
Answered! Go to Answer.
07-06-21 03:23 PM
07-06-21 03:14 PM
07-06-21 03:23 PM
11-06-21 09:19 AM
11-06-21 01:18 PM
11-06-21 01:19 PM