Skip to main content
I think this is simple.  I am running FME 2011.  I would like to change the value of a published parameter during a translation (i.e. overide what was set at run time).  Since i use a parameter fetcher in many locations of my workbench, i only want to change this in one location at the start of my translation based on a set of other criterial.

 

 

I tried to use an attribute setter set $(PublishedParameterName) = New Value however this did not work.

 

 

My workaround is to use variable setter / retriever however i would prefer not to do this.

 

 

Thanks in advance.
Hi,

 

 

unfortunately parameters are read-only, their values cannot be changed anyhow at run-time. The VariableSetter/Retriever, as you mentioned, or a Python global variable could be a workaround.

 

 

Takashi
Alternatively you can use a scripted parameter to generate a value at startup based on a criteria. The drawback with this approach is that the criteria would need to be done inside the script and could not be based on elements in the workspace itself.

 

 

Example of scripted parameter
Hi,

 

 

unfortunately parameters are read-only, their values cannot be changed anyhow at run-time. The VariableSetter/Retriever, as you mentioned, or a Python global variable could be a workaround.

 

 

Takashi

I tried using a VariableSetter/Retriever (to/from a Parameter) but the value is blank on retrieval. I can't use an attribute as they're lost after a FeatureWriter is executed.

And while FeatureWriters have "Additional Summary Attributes" - the value of _featuretype{0}.VariableName is empty.


I tried using a VariableSetter/Retriever (to/from a Parameter) but the value is blank on retrieval. I can't use an attribute as they're lost after a FeatureWriter is executed.

And while FeatureWriters have "Additional Summary Attributes" - the value of _featuretype{0}.VariableName is empty.

Hi @peterx The VariableRetriever has likely been triggered before the variable was set with a VariableSetter. See https://knowledge.safe.com/questions/52322/variable-setter-and-retriever-foundations.html and https://knowledge.safe.com/questions/72246/variablesetter-and-variableretriever-run-order.html for more ideas. You also might want to try the VariableGetter custom transformer which has a port for features where the variable exists and one for where the variable hasn't been set.


Reply