Skip to main content

Hi I'm new to FME and have been unsuccessful in figuring this out.

My workspace originally had a choice user parameter where the user could choose a single string (eg. AA) which was then used to read GeoTIFFS that have that string in their filename.

Now I want to have multiple choice, and I have changed the user parameter to be a Choice (Multiple). So the parameter ends up looking something like this: AB EB TT

I'm trying to figure out how I can now have the workspace loop through and execute the transformers on each choice one at a time.

TIA

There is multiple ways of doing this, but I would try:

Create an attribute from the parameter.

Use the AttributeSplitter (space delimited) to generate a list from the chosen values (AB and EB and TT).

The use the ListExploder to get features per value in the list.

Feed these features to the mentioned transformers that you need to execute.


There is multiple ways of doing this, but I would try:

Create an attribute from the parameter.

Use the AttributeSplitter (space delimited) to generate a list from the chosen values (AB and EB and TT).

The use the ListExploder to get features per value in the list.

Feed these features to the mentioned transformers that you need to execute.

Thanks @erik_jan! This worked perfectly.

this won't execute the input one at a time (looped) running the workspace for each choice separately. It's just feeding it 3 features, which is not the same.


I have exactly the same issue. And @gio is correct, the recommended solution does not iterate though the list resulting from the ListExploder. Can anyone recommend a working solution for iterating through values provided by a multiple choice user parameter?

Regards, Damian


I have exactly the same issue. And @gio is correct, the recommended solution does not iterate though the list resulting from the ListExploder. Can anyone recommend a working solution for iterating through values provided by a multiple choice user parameter?

Regards, Damian

You are probably best raising this as a new question explaining what you are trying to achieve


I have exactly the same issue. And @gio is correct, the recommended solution does not iterate though the list resulting from the ListExploder. Can anyone recommend a working solution for iterating through values provided by a multiple choice user parameter?

Regards, Damian

Workspacerunner.

Feed the the result of the exploded list to a workspacrunner.

or

Feed it to a custom containing relevant processes (if possible and or desirable)

 addendum.. custom requires tsesting of counter inside custom. WHich makes workspacerunner an easier option

 

Use the count of the listexploder to guide the proces. ( _element_index)


Workspacerunner.

Feed the the result of the exploded list to a workspacrunner.

or

Feed it to a custom containing relevant processes (if possible and or desirable)

 addendum.. custom requires tsesting of counter inside custom. WHich makes workspacerunner an easier option

 

Use the count of the listexploder to guide the proces. ( _element_index)

Great, thank you @gio​ ​, worked a treat. I used the original suggestion by @erik_jan​ (AttributeSplitter, ListExploder), added the Workspacerunner, and then the rest of my FME script after that.

Regards, Damian


Reply