Skip to main content
Best Answer

Lookup and replace where lookup is to match 2 criteria

  • October 21, 2019
  • 3 replies
  • 46 views

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

Best answer by ebygomm

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Influencer
  • Best Answer
  • October 21, 2019

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


  • Author
  • October 21, 2019

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


  • Author
  • October 22, 2019

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