Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gf
Creator III
Creator III

ApplyMap doesn't use default mapping

Hello all,

My ApplyMap which looks like this: 

ApplyMap('T1',LANDISO & BLTSPRISO & BLTGS1,'AT' & 'DEAT' & BLTGS1) as TextG1

doesn't work as expected.

For values where LANDISO and BLTSPRISO and BLTGS1 are in my Mapping table it works fine but if the value isn't in my mapping table, T1 should map on  'AT' & 'DEAT' & BLTGS1 which doesn't work..

Any ideas?

 

Regards, Gf

Labels (4)
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

>>but if the value isn't in my mapping table, T1 should map on...

I think you may be misunderstanding the third parameter of ApplyMap(). It is simply a value that is returned if there is no match in the mapping table. To map a different value, you could use this:

 

ApplyMap('T1', LANDISO & BLTSPRISO & BLTGS1, 
    ApplyMap('T1', 'AT' & 'DEAT' & BLTGS1, 'No Match')) as TextG1

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
Lisa_P
Employee
Employee

Can you show your script ?
Nishanthi
Contributor II
Contributor II

Hi, BLTGSI hope it is a field.... So if none maps in your situations then it goes to this expression,
" 'AT' & 'DEAT' & BLTGS1 ". But here if you look at it, it doesn't know internally which value of it to concatenate. For example , BLTGS1 contains A1,B2,B4,Y6 then from your expression point of view,
ATDEAT___ which value should be replaced. So try giving any other alternative.
jonathandienst
Partner - Champion III
Partner - Champion III

>>but if the value isn't in my mapping table, T1 should map on...

I think you may be misunderstanding the third parameter of ApplyMap(). It is simply a value that is returned if there is no match in the mapping table. To map a different value, you could use this:

 

ApplyMap('T1', LANDISO & BLTSPRISO & BLTGS1, 
    ApplyMap('T1', 'AT' & 'DEAT' & BLTGS1, 'No Match')) as TextG1

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein