
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Double Apply Map
Good day
I have my mapping load table with all the mapping detail that is required for a applymap.
But now I want to apply the map to different fields in different tables.
Only doing the apply map once in order to get one field to use in the front end.
Is this possible?
Juice Table: |
JuiceName |
---|
SoftDrink Table: |
SoftDrinkName |
---|
MappingDrinks | DrinkName |
Coke | SDCoke |
Sprite | SDSprite |
Fanta | SDFanta |
Orange | JuiceOrange |
Mango | JuiceMango |
Apple | JuiceApple |
I tried
applymap('MappingDrinks',SoftDrinkName, JuiceName) as Drinks
Thanks in advance


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey there,
I'm affarid to dissapoint you, but you can't make a double applymap. Lete me ask you this question because I didn't understood your issue: What you are trying to achieve? Please explain us better
Regards,
MB

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Corleen,
so, if I understand you correctly you have done a single MAPPING LOAD.
Given that you are loading two tables, one for Juices, and one for SoftDrinks, you will need to do two applymaps, using the same mapping table. These will be:
applymap('MappingDrinks', JuiceName) as Drinks
and
applymap('MappingDrinks', SoftDrinkName) as Drinks
You will then end up with a common field named Drinks.
I'm not sure what the structure of your data model is, so this may cause linking issues.
Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you elaborate on what you are trying to do? I am not sure I understand what you are trying to do . Would you be able to provide a sample
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is the expected o/p using Apply Map?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like you want to combine two fields from different tables? You can Resident load form these tables to create a new field Drinks. I'm not even sure you would need a map, I would also create a field say SortOfDrink. This looks like this:
Script something like this:
JuiceTable:
Load * Inline [JuiceName
Orange
Mango
Apple
];
SoftDrinkTable:
Load * Inline [SoftDrinkName
Coke
Sprite
Fanta
];
Drinks:
load
'Juice' as SortOfDrink,
JuiceName as [Drinks]
Resident JuiceTable;
//This concatenates to the table above
load
'Soft Drink' as SortOfDrink,
SoftDrinkName as [Drinks]
Resident SoftDrinkTable;
//If not needed anymore, dropping the original tables
Drop Table JuiceTable;
Drop Table SoftDrinkTable;


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you would be able to do it if both fields where in the same table. But with your structure as it is you wont be able to map both fields.
The syntax should be something like this:
applymap('MappingDrinks',SoftDrinkName, applymap('MappingDrinks',JuiceName,'No map value')) as Drinks
It would be great if you share a sample app in order for us to give you a more accurate answer, otherwise we are just guessing here.
Please let me know if this helps.
Kind regards,
