Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Biztalk expression editor: lowercase – uppercase
- This topic has 6 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
February 27, 2006 at 9:28 AM #12975
It is case sensitive.
So variable agentNameStr is different from variable AgentNameStr.
-
February 27, 2006 at 6:37 PM #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]-
February 28, 2006 at 6:57 PM #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]-
February 24, 2006 at 8:31 AM #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
-
February 27, 2006 at 2:57 PM #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
-
February 28, 2006 at 8:55 AM #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
-
March 3, 2006 at 8:30 AM #12981
Thanks for your message.
With a helper function, it’s OK.
Raoul
-
-
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.