Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Imagine I have following value for the field called "Product".
Product
-------
Pen
Pencil
Eraser
Box
Account
------
XXX
YYY
ZZZ
PPP
I want use ApplyMap, if the value of product is Pencil then while using ApplyMap I need to Prefix the corresponding Account with AA.
For example if the Account value of Pencil is zzz then I want to prefix it with AA. So the value of ApplyMap field will be AAXXX.
Please help me on this...
use another applymap function to get the prefix (AA) and concatenate both apply maps
ex: applymap('Prefix',product,'NA') &applymap('mapacct',product,'NA')
Can you provide AccountValue and Prefix for all the above products
We need to prefix AA whatever account value is there. Please let me know if it is not understandable.
GGG --> AAGGGG
JJJ --> AAJJJ
if the prefix is not based on your product, just use 'AA'&applymap(.....) as fieldname.
Thank you
But it should be only when the Produuct=Pencil and it is not for all. Hope it is clear now!
Hi Manish,
Above is just the sample data to understand my requirement. I am little stuck with the logic and to implement this.
Use
Account & Applymap('ApplymapTable', Product)
=if(Product='pencil','AA','') & applymap('MyMap', Product)
-Rob
Hi,
Try this script
Map:
Mapping Load * Inline [
Product, Prefix
Pen, AA
Pencil, BB
Eraser, CC
Box, DD
];
Test:
Load * Inline [
Product, Account
Pen, XXX
Pencil, YYY
Eraser, ZZZ
Box, PPP
];
Result:
Load *,
ApplyMap('Map',Product)&Account as Result
Resident Test;
Drop Table Test;