Skip to main content

In a lot off my workspaces I need to fetch some 'global' values based upon user input. Example: user needs to provide project name: first check if projectname complies with the rules, once that is ok, use some api's to fetch global values for that project.

Now those global values are in an attribute and need to keep track of those when using attributekeepers, list builders,...

I can set them as a global variable with variable setter but it means that I need to use a lot off variable retrievers (10+).

 

Is there a way that I can put that value in a private parameter so that I can use it across the workspace without the variable setter and retrievers?

Would bundling the logic to fetch the global values into a 'universal' custom transformer be an option? When you need a global value you place the custom transformer where need in your workspace and specify what value(s) you need it to fetch?


Would bundling the logic to fetch the global values into a 'universal' custom transformer be an option? When you need a global value you place the custom transformer where need in your workspace and specify what value(s) you need it to fetch?

That's a possibility, but in my case less efficient as one of the other global values is fetched from a database, so that would be fetched (and connected to) multiple times in the same workspace and potentially less performant.

Then the variable setter/retriever combo would be more efficient if that's the only way to go


Could you perhaps implement the logic as a scripted (python) private parameter?


Could you perhaps implement the logic as a scripted (python) private parameter?

For certain ones that would be possible, but for others it would require installing additional libs (like psycopg2) and creates extra hassle at client side (multiple python versions, conflicts with the libs,...) and that would be more cumbersome (for me 😉 ).

Preferably I also would like to avoid working with workspace runners so that in the mother I check the data & parameters and provide them as public parameters in the child. But also avoid custom transformers as I have there issues with parameters in CT that are derived from values (problems with list builders etc).

So if there is no other possibility to update parameter values, I might settle for variable setter / retrievers then.


Reply