Skip to main content

Hello!

I'm trying to create a tool in Data interoperability (FME for ArcGIS) that gives the User a list of attributes to choose from based on the read source. I'll make things more clear.

Let's say i have X.

X= People info

I'm reading X and filtering out with a tester based on a criteria and it returns me 3 entries. Next i want the user to see those 3 entries and have the possibility to choose which ones continue along the process of the tool.

I can't make the user choose the parameter beforehand because he does not know what the first tester will end up with.

Is it possible to accomplish this in FME? If so how would you recommend to do?

Hi @dtvladsilviu, user parameters for a workspace would be statically configured before the translation started, you cannot define a new parameter dynamically based on some data at run-time.

Hack: However, you can create and show a parameters dialog box to get a user input dynamically, using FME Objects Python API. This workflow illustrates how it works. If you are familiar with Python scripting, I think you can implement most processes in the PythonCaller.

# PythonCaller Script Example
# Create and show a parameters dialog box.
import fmeobjects
def processFeature(feature):
    filename = feature.getAttribute('_pathname')
    if fmeobjects.FMEDialog().parameterPrompt(filename):
        feature.setAttribute('_applied', 1)

0684Q00000ArLvzQAF.png

For example, if the external table contains these choices,

choice
A B C
L M N
X Y Z

the Python script creates and shows this parameters dialog.

0684Q00000ArLnIQAV.png

See these links to learn more about GUI lines and the Python API method:


takashi ,

Could you please explain more how to list the values from an external table as a dropdown in the workbench parameter?

 


Reply