2 Replies Latest reply: May 26, 2017 5:23 AM by Simone Trabattoni RSS

    Mapping and & operator

    Simone Trabattoni

      Hi community,

      I'm working with the Mapping group of features, and I've found a small problem that I'd like to solve, maybe helping pointing out it.

      Hovever, here the situation: I have this table, that has clearly a pair of mistakes.

       

      LOAD

      Label.Key,

      Label.Key&Name

      Inline

      [Label.Key, Name

      'A','first'

      'FI','second'

      'CP','third'

      'RM','fourth'

       

      And the red Label occurency are wrong, so I decided to remove them and adding the right Labels with a mapping (applied before the table):

       

      Mapping:

      Mapping Load Old, New Inline

      [Old, New,

      'CP', 'NS'

      'FI', 'NS'

      'RM', 'NS'

      ];

       

      MAP Label.Key Using Mapping;

       

      Unluckily the result is not perfect, because the mapping maps only the field Label.Key without mapping Label.Key&Name.

      mapping.PNG

      I'd like also the Label.Key part of the Label.Key&Name mapped.


      I've tried something like:

      LOAD

      Label.Key,

      Applymap(Mapping, Old, Label.Key)&Name

      Inline

      [Label.Key, Name

      'A','first'

      'FI','second'

      'CP','third'

      'RM','fourth'

      ]

      But I got an error that says:

      ApplyMap error: map_id not found

      How could I make it work?


      Thanks in advance