Skip to main content

Hi Community,

 

I have created an FME workflow to complete a RAG analysis (Red, Amber, Green) and need help to automate the very last step of the workbench which uses a ExpressionEvaluator transformer.

 

For now I have included 14 different ExpressionEvaluator transformer to calculate the average value of the 14 RAG guidelines, here is an screenshot of the 14 transformers:

 

image...but what I want to improve is the way of each of these 14 guidelines are being calculated as the ExpressionEvaluator transofrmer uses an expression that manually needs to be updated each time a new dataset is added into the analysis, here is an example of the expression:

 

image If an additional dataset needs to be included then I manually need to change the expression from 5 to 6 as divider...and trying to avoid this.

 

Is there any way I can tell FME to update the divider if new dataset is added? Ultimately I want to make the average calculation as a Custom transformer.

 

 

 

I'm going to need some more background info on this (and possibly a higher res screenshot so we can more clearly see which transformers you're using). General rule of thumb is that whenever you have multiple transformers of the same type close together you should see if that really is the best way of doing it.

 

I wonder if you could put everything into a list, then use the ListElementCounter to count the number of elements, which should be your divider.


Reply