Skip to main content
Best Answer

user Parameter not updating for life of workspace

  • April 26, 2018
  • 3 replies
  • 68 views

I need to concatonate a user Parameter with a value from each feature that passes thru.

But it seems with each feature that passes thru, my parameter is starting fresh with original value.

I need something like the "counter" transformer which remembers the count for the life of the workspace.

Is there a global variable that I can update and append to and change and it is retained for the life of the workspace without delving into python?

Perhaps user Parameters is the wrong vehicle?

Thank you

Best answer by david_r

User parameters cannot change once the translation has started, they're basically read-only at that point.

If you need to keep track of global variables in your workspace, look into the VariableSetter and the VariableRetriever.

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.

3 replies

david_r
Celebrity
  • Best Answer
  • April 26, 2018

User parameters cannot change once the translation has started, they're basically read-only at that point.

If you need to keep track of global variables in your workspace, look into the VariableSetter and the VariableRetriever.


  • Author
  • April 26, 2018

Thank you.

Do you know how to update a variable? The 'setter and 'retriever only go back and forth between attributes and my variable.

tedious workflow:

'setter MyVar with value="" to begin

each feature that passes...

  • 'retrieve MyVar into AttribA then
  • stringconcat AttribA+"something" then
  • 'setter AttribA back into MyVar

and it worked, it keeps a running total concats in MyVar but its tedious.

I would like to just update the varibles directly but I can't SEE variables inside of the StringConcat transformers or as I believe any transformers.

thank you


david_r
Celebrity
  • April 26, 2018

Thank you.

Do you know how to update a variable? The 'setter and 'retriever only go back and forth between attributes and my variable.

tedious workflow:

'setter MyVar with value="" to begin

each feature that passes...

  • 'retrieve MyVar into AttribA then
  • stringconcat AttribA+"something" then
  • 'setter AttribA back into MyVar

and it worked, it keeps a running total concats in MyVar but its tedious.

I would like to just update the varibles directly but I can't SEE variables inside of the StringConcat transformers or as I believe any transformers.

thank you

Yeah, I agree it's a bit tedious, there are no other tranformers than those two that can access these variables.

 

Unfortunately I have no other suggestions unless you want to break out Python or some other form of scripting.