I would like to create a user parameter that can be completed based on the inputs of a previous parameter. I'm wondering if this is possible because the dataset is unknown until I use a user parameter to determine what is read into the workspace - this means that it is not possible to use a WHERE clause in the FeatureReader, because there are no existing attributes available for it to pull from. I have tried looking through the different user parameter options, but can't see anything that would work - essentially as a tester - to filter the data that is read in with the first parameter. I am using FME 2020.
The best way to do this is to use a scripted parameter. FME supports both Python and TCL. I don't know TCL, so here's a very simple setup using a python scripted parameter (FME 2020.1, but this has been supported for years).
I have created two parameters. The first one is a choice parameter called "COLOUR" with three values, RED, GREEN, and BLUE. The second parameter is a python scripted parameter called "NUM" which will look at the COLOUR parameter, and depending on the value, return a number.
and the NUM parameter:
The python code I used is:
if fme.macroValues['COLOUR'] == 'RED':
elif fme.macroValues['COLOUR'] == 'BLUE':
Of course, this is a very simple example, and you can make this as complex as you need it to be.
There are a couple of examples of the use of these parameters on Python Scripted Parameters in FME.