Skip to main content
I am creating a workbench that requires the user to set a parameter from a list of valid values.  I then want to use that value to lookup a number of criteria that will be used within the workbench.  Items that I hope to set to a variable include:
  • SDE Connection File
  • Output directory for derived data (shapefiles, Excel, KMZ, HTML)
  • selection statements

I have successfully configured the parameter, passed that to a Parameter Fetcher, Tester, Variable Setter, and Attribute in an output Excel file.  What I haven't been able to do is use it to set the Excel output path\\file name.

 

 

I just read that a Parameter must be set at runtime and I think that is my problem, I'm trying to set the parameters within the workbench.

 

 

Is it possible to get the user input, and create variables\\set parameters before runtime?

 

 

Here are a few thoughts:
  • Have a "dashboard workbench" that gets the user input and sets variables.  Then call a second workbench and utilize the variables\\parameters set by the "dashboard"
  • Create a Python startup that gets user input and sets the variables.
I haven't written much Python so I'm not sure how to go about getting user input, using a lookup to establish variable values and then propogate those through FME.

 

 

I'm also not sure of the syntax to use within FME to expose\\utilize variables set by a Python startup script.

 

 

Any thoughts or ideas greatly appreciated.

 

 

Regards,

 

JCarr
Hi,

 

 

In general, a user parameter value can be accessed in other user parameter value setting.

 

For example, if there are already these published parameters, OUTPUT_DIR (output directory path) FILE_NAME (output file name without extension)   you can define a private parameter like this. Type: Text Name: OUTPUT_PATH Value: $(OUTPUT_DIR)\\$(FILE_NAME).xlsx   $(PARAM_NAME) will be replaced with the value of parameter named PARAM_NAME at run-time. And then, you can link the Excel writer destination dataset (i.e. file path) parameter to OUTPUT_PATH.   Alternatively, in such a simple case, you can also specify "$(OUTPUT_DIR)\\$(FILE_NAME).xlsx" directly as the Excel writer destination dataset parameter.   The above is just an example. If more complex procedure will be necessary  for constructing required parameter value, the Scripted (Python or Tcl) Parameter could be appropriate. Concrete solution depends on the actual configuration of user input parameters and the requirement.

 

 

Takashi
Hi,

 

 

if you need to decide the Excel writer path and/or filename during run-time, you could use a dataset fanout coupled with one of your attributes.

 

 

David

Reply