Question

Is it possible to disable one published parmaters based on the value of some other pubished parameter.

  • 4 February 2021
  • 7 replies
  • 2 views

Badge

For example:

Parameter 1: 

Calculate area: yes/no

 

Parameter 2:

Units: m2/ km2,....

 

I would like to disable parameter 2 if the value of the parameter 1 is set to "no".

 

At the same time I would like to have Parameter 2 as an mandatory parameter if the value of the Parameter 1 is "yes"

 

Thank you!


7 replies

Badge +2

There is nesting (tree) in the published parameter 'Choice' that you can use a Tester or TestFilter on to build your logic. Basically, you create a case for each possible combination in a delimited list and then use the one you want.

 

http://docs.safe.com/fme/2020.2/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/adding_a_parameter.htm?Highlight=use tree

 

The other way is to use a series of testers to meet conditions. I use either one depending on the complexity of the data.

Userlevel 4

Alternatively, have a look at FME 2021 (currently in beta), where there is a lot of new functionality in this regard. Available here: https://www.safe.com/support/downloads/#beta

Badge

There is nesting (tree) in the published parameter 'Choice' that you can use a Tester or TestFilter on to build your logic. Basically, you create a case for each possible combination in a delimited list and then use the one you want.

 

http://docs.safe.com/fme/2020.2/html/FME_Desktop_Documentation/FME_Workbench/!Transformer_Parameters/adding_a_parameter.htm?Highlight=use tree

 

The other way is to use a series of testers to meet conditions. I use either one depending on the complexity of the data.

Thanks for yur answer but I'm not sure if I understood correctly.

Are you basicaly proposing to have everything inside one parameter with the provided choice of all possible combinations? Can you make a sample workspace that will help to understand better?

 

Anyway, I would like to keep all parameters and to disable one (or more) in the case when the parameter/s are not relvant in relation to values selected on other parameter/s.

 

One simple example is provided and explained earlier in the post but it can be much more complex case with many parameters and complex depandancise between them.

 

I just want to make things more user freindly when I create custom transformer or when I make a workspace for customers.

 

Badge

Thanks

Badge +2

Alternatively, have a look at FME 2021 (currently in beta), where there is a lot of new functionality in this regard. Available here: https://www.safe.com/support/downloads/#beta

as @david_r​ mentions. FME 2021 will include a new parameter builder tool that will allow this sort of inheritance. Watch for the 2021 What's Great webinars which should be on the schedule fairly soon

Badge +2

Thanks

Webinar date has been confirmed 9th March 2021

Badge

Thanks!

I'm looking forward to seeing the webinar.

Reply