Skip to main content
Solved

user Parameter not updating for life of workspace


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.

View original
Did this help you find an answer to your question?

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
avineon wrote:

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.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings