Question

Populating a list of attribute names into a published parameter at runtime

  • 31 August 2018
  • 3 replies
  • 4 views

Badge +1

Hi,

I have a FME workspace which is intended to converting data from any format/schema into a defined standard personal gdb format which we have defined internally. I would like to create a published parameter exposing attributes of the source dataset (eventually picked upfront by the user in a separate published parameter) and allowing the user to choose the appropriate attribute which needs to be used by the workspace (example: "Pick street name field"). Schemas and attribute names are not known in advance and I would prefer avoiding using the SchemaMapper plus asking users to update a separate schema file upfront every time new source material needs to be processed. Does FME provide a solution for fetching attribute names at runtime (a published parameter could probably call another FME worskpace or script retrieving those names and returning them into a drop-down in the prompt window)?

Thank you for your suggestions!

Olivier


3 replies

Userlevel 4

Unfortunately, there is no (easy) way to dynamically populate the published parameter lists at runtime.

It's possible, although a bit complex, to put together a workspace that first reads the input schema and then uses Python to present the choices to the user before continuing the processing. This will only work on FME Desktop, however, not on FME Server.

Badge +1

Thank you @david_r! If you happen to have an example of Python showing choices to the user, please let me know. In the meantime I will go for the SchemaMapper alternative

Userlevel 4

Sorry, I haven't got any examples at hand. But you could start off by looking at the different GUI frameworks available and pick the one that makes it easiest from your point of view.

https://insights.dice.com/2017/08/07/7-top-python-gui-frameworks-for-2017-2/

Reply