Solved

Lookup and replace where lookup is to match 2 criteria

  • 21 October 2019
  • 3 replies
  • 1 view

Hi folks,

New to FME and am struggling with working out how to set multiple feature values based on a multiple criteria lookup

My source looks like the following

system_iddescriptionpurposeST1ST21Scout HallCC

 

 

2Town HallT

 

 

3Council OfficeWS

 

 

 

My translation table looks like the following

SelectionTypeRAMM.fieldRAMM.DescriptionT1BUILDUSEramm.ud_buildings.purposeMUSHERCULTBUILDUSEramm.ud_buildings.purposeHBHERCULTBUILDUSEramm.ud_buildings.purposeCCCOMMUNITBUILDUSEramm.ud_buildings.purposeTPUBLICBUILDUSEramm.ud_buildings.purposeWSMUNICIPLBUILDTYPEramm.ud_buildings.purposeMUSMISCBUILDTYPEramm.ud_buildings.purposeHBMISCBUILDTYPEramm.ud_buildings.purposeCCCOMYHALLBUILDTYPEramm.ud_buildings.purposeTPBTOILETBUILDTYPEramm.ud_buildings.purposeWSDEPSTOREBUILDTYPEramm.ud_buildings.purposeFESMISCBUILDTYPEramm.ud_buildings.purposeCCSCHANGERMBUILDTYPEramm.ud_buildings.purposeRCCOMYHALL

 

I want to update ST1 using the SelectionType BUILDUSE and ST2 based on BUILDTYPE based on the purpose in the source to give me the following

system_iddescriptionpurposeST1ST21Scout HallCCCOMMUNITCOMYHALL2public ToiletTPUBLICPBTOILET

 

3Council DepotWSMUNICIPLDEPSTORE

 

 

Ive used FeatureMerger to do this on individual features but not multiple features

icon

Best answer by ebygomm 21 October 2019, 16:09

View original

3 replies

Userlevel 1
Badge +10

I would aggregate your translation table based on RAMM.Description, and build a list containing the T1 data. You can then featuremerge in the normal way and rename list item 1 to be ST1 and list item 2 to be ST2

 

@left65 Example attached

 

merge2.fmwt

I would aggregate your translation table based on RAMM.Description, and build a list containing the T1 data. You can then featuremerge in the normal way and rename list item 1 to be ST1 and list item 2 to be ST2

 

@left65 Example attached

 

merge2.fmwt

Hi ebygomm

Thanks for the response but i have never used the aggregator so am not sure what to do or how this would work. Can you give me any hints or perhaps an example

I would aggregate your translation table based on RAMM.Description, and build a list containing the T1 data. You can then featuremerge in the normal way and rename list item 1 to be ST1 and list item 2 to be ST2

 

@left65 Example attached

 

merge2.fmwt

Thanks so much, that works perfectly

Reply