Skip to main content
Question

Using a scripted parameter to return values for choice parameter ?


lifalin2016
Contributor
Forum|alt.badge.img+29

Hi all.

Is it possible to use a scripted parameter in a workspace to populate the items for a choice parameter ?

So far I’ve had to manually edit the choice list whenever new items needed to be added, but potentially it’s possible to create all the items automatically with a query to a database. This would release me from having to update it manually.

The example I’ve found only talks about returning a single text, but a choice parameter needs a list of display+value pairs.

Any insight is welcome.

Cheers

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+55
  • Celebrity
  • June 22, 2025

Kinda - something i’ve been exploring (when i’ve had time!)

You will need to create a transformer (not a custom transformer) using the SDK. In 2024 onwards you can have a dynamic scripted selection populate by python - https://docs.safe.com/fme/html/fpkg-sdk/advanced/scripted-selection/


alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 23, 2025

You might be interested in a new undocumented FME Flow feature present in 2025.1 beta b25583 : 

 


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • June 24, 2025
hkingsbury wrote:

Kinda - something i’ve been exploring (when i’ve had time!)

You will need to create a transformer (not a custom transformer) using the SDK. In 2024 onwards you can have a dynamic scripted selection populate by python - https://docs.safe.com/fme/html/fpkg-sdk/advanced/scripted-selection/

Thanks ​@hkingsbury 

I’ll look into it.


lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • June 24, 2025
alexbiz wrote:

You might be interested in a new undocumented FME Flow feature present in 2025.1 beta b25583 : 

 

Thanks ​@alexbiz 

Our servers are still 2022, so I’ll need to defer this to when they’re being upgraded.

But thanks for the heads-up.


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