Skip to main content
Solved

update parameters during runtime

  • September 26, 2023
  • 4 replies
  • 167 views

tva
Contributor
Forum|alt.badge.img+12
  • Contributor
  • 45 replies

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?

Best answer by nordpil

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+63
  • Celebrity
  • 1625 replies
  • September 26, 2023

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?


tva
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 45 replies
  • September 27, 2023

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


nordpil
Supporter
Forum|alt.badge.img+11
  • Supporter
  • 46 replies
  • Best Answer
  • September 27, 2023

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


tva
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • 45 replies
  • September 27, 2023

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.