Skip to main content
Question

Using a scripted parameter to return values for choice parameter ?

  • June 20, 2025
  • 4 replies
  • 77 views

lifalin2016
Supporter
Forum|alt.badge.img+38

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+64
  • 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
Influencer
Forum|alt.badge.img+28
  • Influencer
  • June 23, 2025

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

 


lifalin2016
Supporter
Forum|alt.badge.img+38
  • Author
  • Supporter
  • June 24, 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/

Thanks ​@hkingsbury 

I’ll look into it.


lifalin2016
Supporter
Forum|alt.badge.img+38
  • Author
  • Supporter
  • June 24, 2025

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.