Skip to main content
Solved

Configuration of self defined Published Parameter for multiple selection?

  • November 13, 2020
  • 5 replies
  • 31 views

alfons
Contributor
Forum|alt.badge.img+7

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.

Best answer by ebygomm

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 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

davtorgh
Contributor
Forum|alt.badge.img+12
  • Contributor
  • November 13, 2020

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!

 


alfons
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 13, 2020

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.

 

 


alfons
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 13, 2020

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


ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • November 13, 2020

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 


alfons
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • November 13, 2020

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.