Biztalk expression editor: lowercase – uppercase

Home Page Forums BizTalk 2004 – BizTalk 2010 Biztalk expression editor: lowercase – uppercase

Viewing 1 reply thread
  • Author
    Posts
    • #12975

      It is case sensitive.

      So variable agentNameStr is different from variable AgentNameStr.

    • #12976

      agentNameStr is a System.String, so you can use any of the methods of this class.

      [code:1:e9a627dc5e]agentNameStr =(System.String)xpath(myMesssage,myXpathStr)
      agentNameStr = agentNameStr.ToUpper();[/code:1:e9a627dc5e]

      • #12977

        Sorry, I tested this on Biztalk 2006 and assumed it was the same on 2004.

        It would appear that Biztalk 2004 classifies strings, ints, doubles, etc as distinguished types and does not allow access to their properties or methods.

        One possibility is to create a helper function in a C# assembly

        [code:1:c69b8c4d44]namespace Biztalk.Utilities
        public class StringFunctions
        {
        public static string ToUpper(string inputStr)
        {
        return inputStr.ToUpper();
        }
        }[/code:1:c69b8c4d44]

        Build and GAC this.
        Add a reference to you biztalk project
        And try this:
        [code:1:c69b8c4d44]agentNameStr =(System.String)xpath(myMesssage,myXpathStr)
        agentNameStr = Biztalk.Utilities.StringFunctions.ToUpper(agentNameStr);[/code:1:c69b8c4d44]

        • #12978

          Hello,

          I’ve to extract informations from a message.
          agentNameStr=(System.String)xpath(myMesssage,myXpathStr)

          Is it possible, in the Biztalk expression editor, to have the value of agentNameStr in lower case or upper case?

          Thanks.

          Raoul

          • #12979

            Sorry for my message, English is not really my mother tongue.

            I know that the name of the variable is case sensitive.

            agentNameStr =(System.String)xpath(myMesssage,myXpathStr)
            Messages are provided by users ==> the value of the variable may be \”test\” or \”TEST\” or \”Test\” or \”TeSt\”, …

            My question is: is it possible to transform the value of the agentNameStr to have agentNameStr =\”TEST\”.

            Thanks

            Raoul

            • #12980

              Thanks for your response.

              I use expression editor Biztalk 2004.

              agentNameStr is a variable (System.String)

              When I write a dot after agentNameStr, I see \”illegal dotted name\”

              The ToUpper() method isn’t reachable.

              Raoul

              • #12981

                Thanks for your message.

                With a helper function, it’s OK.

                Raoul

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