Hi experts,
Please help me in creating an UDF. Below is the requirement.
Source
---Orders...................1-n
-----Header.................1-1
-------PONo.................1-1
-----Item...................1-n
-------Charecterestics......1-n
-----------ObjectNo
-----------ObjectType
-----------Groupcode
-----------CharDesc
-----------CharVal
-----------NumVal
:
:
etc
Target field will occur for every Orders.
Requirement is for all "Charecterestics"(will come 'n' times) check if "ObjectNo" matches with "PONo" (1 occurrence for each "Orders" but n number of "Orders" can come), if matches then check if value present in "CharVal" take the value else take value from "NumVal". If "ObjectNo" does not matches with "PONo" ignore that "Charecterestics".
Either of CharVal or NumVal will have value.
I tried with graphical mapping and it worked but the problem is, there are similar logic with different fields which are huge in number and for that I need a UDF which can be used everywhere.
Please help me out.