What I'm trying to do :

I have two shp file readers as input. I'd like to calculate the maximum value in column 1 of Table B and then populate a new field in Table A with that same value (same value in all rows). Additional information, there is no common fields or geometry between them so I can't perform a Join...

What I've tried so far :

I used the StatisticCalculator transformer to return the max value from the column in table B. I then thought that I'm basically trying to declare a variable, so I used the the VariableSetter and Retriever - defining a global variable. Thinking it would be available in the Attribute Manager that I use on Table A (to create the column and populate with my global variable). However the attribute 'max' is only available if I connect the VariableRetriever as an input. The result is the AttributeManager creates a new feture and populates the new column in that specific row (i.e. the row containing the new feature). Where as, I don't want to create a new feature, but I do want to copy the value from the max value from the StatisticCalculator into every row of the new column...

I'm fairly new to FME and I imagine there is an easy solution... anyone know what I'm missing ?

Basic model

  • 2
    create a unique number between tables and use the Feature Merger engage.safe.com/transformers/feature-merger/…. then spilt out using the unique number.
    – Mapperz
    Apr 27, 2023 at 12:56
  • 1
    @Mapperz Thanks - I was barking up the wrong tree with the variableSetter / Retriever
    – lhowarth
    Apr 27, 2023 at 13:55

1 Answer 1


OK so with the comment of @Mapperz (thanks) I've got a simple solution (I was sure there would be...). Use the attribute manager to create a join field on both tables with a common value, then pass the resulting tables into the feature merger and bingo... no need to use the VariableSetter or VariableRetriever.

enter image description here

  • 1
    Actually, you don't even need to create that join field. You can type the same constant value directly into the Requestor/Supplier fields in the FeatureMerger. It really doesn't make a difference, but I thought I'd point it out. Apr 27, 2023 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.