Storing values in a variable for a biztalk transformation.

Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Storing values in a variable for a biztalk transformation.

Viewing 1 reply thread
  • Author
    Posts
    • #22579

      Hi,

      Am new to biztalk development. We have a requirement like this. Say ProductName is in the source Schema and Destination Schema has ProductType. In DB we have GetProductType(ProductName) procedure. We are able to do this mapping using BizTalk mapper ( scripting functoid and above sp call ) and fine.

      Now we have other fields (say 5 other fields) in destination schema, which will also use the same ProductType and based on it, it does some thing else ( E.g., if ProductType == “NOTEBOOK” then “1” ). We can acheive this again by scripting functoid for each destination element.  But GetProductType(ProductName) will be called 6 times, even though the value it returns is same for one complete transformation.

       Is there any way we can store the value of ProductType for the current mapping/transformation  in a variable and just use it to map others.  For example any thing like a variable functoid and store the ProductType in  there and use it in the other 5 script functoids for mapping ( this will save extra calls to DB. if million rows then 5 milliion calls )

      Thanks in advance. Please feel free to correct or suggest me . Am newbie, so could be missing some obvious thing in Biztalk Mapper.

    • #22581

      You could call your GetProductType(n) before you begin the transformation and store it in a helper message. Then in your map use a multi-part message as the source – it would consist of your source message and the helper message. Then simply map the helperMessage node containing the product type  to your five other scripting functoids.

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.