Biztalk application design

Home Page Forums BizTalk 2004 – BizTalk 2010 Biztalk application design

Viewing 1 reply thread
  • Author
    Posts
    • #13008

      You can use the Xpath statement as an alternative to promoted fields.

      For example:
      myValue = Xpath(myMessage,\”string(\\Employees\\Employee[3]\\Salary)\”);

      You can dynamically build the xpath.

      inside loop:
      myVariableSubscript = myVariableSubscript + 1;
      myXpath = \”string(\\Employees\\Employee[\” + System.Convert.ToString(myVariableSubscript) + \”]\\Salary)\”;
      myValue = Xpath(myMessage,myXpath);

      I have not dealt with numbers much, but I guess you could do this:
      mySalary = String.Convert.ToDecimal(myValue);

      You can get the full xpath by clicking on the element in the schema builder tool and going to the properties window. Due to namespaces, the xpath will be much longer, such as
      [local-name()=\”Employees\” and namespace=\”http:/xxxxxxx\”]\\local-name()=\”Employee\” … and so on… See my blog nealwalters.blogspot.com for full details and dealing with this type of xpath.

      Neal Walters
      http://Biztalk-Training.com

    • #13009

      Have you considered using the Cumulative Sum and Cumulative Average functoids

      • #13010

        I have an xml schema which contains a record node. There will be multiple records in record node. I am using map to transform this to output schema. Some of the fields in output schema will be calculated from the multiple record elements.
        There can be multiple choices of designing the system. I have decided to use loop functoid to calculate the sum and average of repeated values in Record element of input schema and map it to output schema.
        Please suggest if instead of using loop functoid, I want to use the loop shape in orchestration, then how it will be possible as I am not able to promote any of attribute or element if it’s under record element.
        Is there any alternative method to achieve the objective?

        Thank you,[color=blue:0906163f05][/color:0906163f05]

        • #13011

          Thanks for the reply both the answer works fine.
          But really I have not considerd using cumulative sum and average functoid. It is the simplest solution and works fine.

          regards,

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