Skip to main content

Hello,

 

I would like to give the user the possibility to select a certain area when starting the script. The areas were previously recorded in a GDB and provided with a corresponding attribute.

GDB_DefFurthermore a Published Parameter was configured according to the areas and their attributes.

published_parameterAfter starting the script, the user is asked which area is of interest to him and he can select it based on the predefined areas. So far this works wonderfully.after_startMy problem now is that my script only works as long as only one area is selected. If the user selects several areas, which should be possible, I do not get a correct selection.

To test my result I have created a tester with the following configuration.tester_parameterMy question now is, how can I successfully select multiple areas? Many thanks for the support.

Hi @alfons​ ,

 

I tried to reproduce your use case with an example (see attached workspace) and it seems to work correctly: as you can see, if you select choices 1 and 2, the parameter is populated with a string containing the chosen numbers separeted by a space.

 

screenshot.1screenshot.2I think the test used in your Tester is not correct with respect to how the parameter is populated.

 

Hope that helps!

 


Thanks a lot for your support. Your sample works perfect alone. If I try to reproduce it in my script I got only a working result, if I run the selection with only one selected area.

I'm not sure, if I'm right but the published parameter provides "only" a string, containing both values ("5 3") of the selected areas? If I use this with my tester, the selection will fail, because it expected a list of the both values (5, 3). How can I transform the attribute into a list within FME without jumping into Python?

I attached my workbench and also the basedatas. Maybe it helps for a better understanding.

 

 


Thanks a lot for your support. Your sample works perfect alone. If I try to reproduce it in my script I got only a working result, if I run the selection with only one selected area.

I'm not sure, if I'm right but the published parameter provides "only" a string, containing both values ("5 3") of the selected areas? If I use this with my tester, the selection will fail, because it expected a list of the both values (5, 3). How can I transform the attribute into a list within FME without jumping into Python?

I attached my workbench and also the basedatas. Maybe it helps for a better understanding.

 

 

forgot the workbench


forgot the workbench

The problem is that your parameter is fetched into an attribute that is on a different feature, you need to fetch the parameter in line

Capture 


forgot the workbench

Thanks a lot for your advice. With your advice and your screenshot I was able to solve the issue. Now it works, how I want.


Reply