The fields of the maps are basically use to map fields of one or more tables.By the help of a maps we can access the fields of one or more tables with different names.
Steps For Creating Maps:
For implementation i have created two tables named DaxSalesTable and DaxProductsTable you can see in below image.
in both the tables i have similar fields.
After that i created a Map
AOT >> DataDictionary >> Maps and Right click and create a Map
then add the fields to map here i have added three fields.As you can see in below image
Next,Under your newly created map you can find mappings node
Create mapping and Set the property mapping table
Here i have mapped DaxProductsTable and then i have mapped the fields as you can see in below image
Now I have created a job on which I will map a table on this map and than use it.
static void Job3(Args _args)
{
DaxMapTest test; //map declaration
// tables
DaxSalesTable daxSalesTable;
DaxProductsTable daxProductsTable;
// Assigning values to the map
test.productnumber = "DAX-001";
test.ProductName = "Jaipal Jadav";
info(strFmt("Map AccountNum : %1",test.productnumber));
// Now here setting accountnum field to daxProductsTable field
test = daxProductsTable;
test.productnumber = "DAX-002";
test.ProductName = "Srikanth Jadav";
info(strFmt("Salestable AccountNum : %1",test.productnumber));
//Now here setting accountnum field to daxSalesTable field
test = daxSalesTable;
test.productnumber = "DAX-003";
test.ProductName = "Akhil Jadav";
info(strFmt("Producttable AccountNum :%1",test.productnumber));
}
Result:
No comments:
Post a Comment