Skip to main content
Open

Unleashing the power of variables!

Related products:Transformers
  • December 16, 2019
  • 8 replies
  • 241 views

bo
Contributor
Forum|alt.badge.img+10
  • Contributor

A parameter is like an argument that is static. A variable, however, represents a state and can be dynamically created and assigned in a workspace. I wish FME workspace UI exposes variables the same way it exposes parameters or attributes. Converting variables to attributes via VariableRetriever does not help, as attributes are about content while variables are about states and flow control.

I am in agreement with @bambography in his or her post.

https://knowledge.safe.com/questions/34563/can-global-variables-be-accessed-as-values-in-tran.html

8 replies

david_r
Celebrity
  • December 16, 2019

I agree, there needs to be better support for using variables without using dedicated transformers (VariableSetter / VariableRetriever). My preference would be to add the following:

Function call, e.g.

@Variable(_my_variable)

Python API, e.g.

value = fmeobjects.FMESession().getVariable('_my_variable') fmeobjects.FMESession().setVariable('_my_variable', 'My Value')

 

 


jdh
Contributor
Forum|alt.badge.img+41
  • Contributor
  • December 16, 2019

At the very least the VariableRetriever should be a dropdown list of all the variable names used in a variableSetter.


itsmatt
Celebrity
Forum|alt.badge.img+48
  • Celebrity
  • July 30, 2021

Oh yes this would make things a lot easier. I would love to use a tester based on the value of a variable in the same way. Having to retrieve the variable as an attribute and then test is a real pain.

 

Also not being able to retrieve multiple variables with one VariableRetriever is another pet peeve (https://community.safe.com/s/idea/0874Q000000TlDuQAK/detail) also https://community.safe.com/s/idea/0874Q000000TkzIQAS/detail

 

Also what David said!


LizAtSafe
Safer
Forum|alt.badge.img+25
  • Safer
  • October 29, 2024
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

LizAtSafe
Safer
Forum|alt.badge.img+25
  • Safer
  • April 5, 2025
The following idea has been merged into this idea:

All the votes have been transferred into this idea.

LizAtSafe
Safer
Forum|alt.badge.img+25
  • Safer
  • June 9, 2026
OpenGathering Interest

LizAtSafe
Safer
Forum|alt.badge.img+25
  • Safer
  • July 23, 2026
Gathering InterestOpen

phoeffler
Supporter
Forum|alt.badge.img+11
  • Supporter
  • August 31, 2026

This would be very useful for situations where one is trying to pass information through to certain transformers or writers, such as portions of a compound file name, and doing so is either impossible or creates extra mess and problems when using User Parameters or Attributes.

Talking with a couple of staff members at Safe Software, they were in favor of greater access to variables as well, but unaware of the existing Ideas.

If not already merged in here, it seems that the Archived Idea at List of created variables (through VariableSetter) as attribute input in Variabl | Community supports one of the comments above, which is also a great Idea. Hard to see why the VariableRetriever couldn’t populate a list of available Variable Name options that have been created by one or more VariableSetters. This would be simpler and less prone to error.

Also agree with others that it would be more convenient to be able to set or retrieve more than a single variable per transformer. A grid layout for parameters and settings would make these transformers more useful and could reasonably support setting and retrieving one or more variables at a time. Reference: Improve VariableSetter/Retriever to allow to set/retrieve Multiple Variables | Community