Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Removing commas using functoids
- This topic has 6 replies, 1 voice, and was last updated 9 years, 3 months ago by
community-content.
-
AuthorPosts
-
-
March 15, 2007 at 11:20 AM #18001
Hello all,
we are periodically receiving commas in a text field from the source system and it causes problems when the data hits the target system; anyone have a clever way to remove commas using the String Functoids?
Thanks.
-
March 15, 2007 at 11:27 AM #18003
you could write a custom functiod for one. Heres an example http://www.codeproject.com/biztalk/CustomFunctoid.asp Further what you could do in the custom functiod is use string.split and get the seperate tokens then concat them and return as a single string(wonder if you can accomplish that with the predefined functoids that come shipped with biztalk server.
-
March 15, 2007 at 2:58 PM #18007
Thanks for the link but I was over my head at steps 8 & 9; I'll try to figure something out using concatenation and string slicing.
-
March 19, 2007 at 1:10 PM #18034
This sound like a neat fustom functoid. I'd build it using the pattern described and give it 2 inputs: string to split, and delimiter. The question is what to do with any exceptions. This can be modifed or switched with a 3rd input perhaps. You can return empty string, the original string, or an error message to test for.
Is this something you'd be interested interested in? I could build it over an evening and post the results. If possible, I'd like someone to generate the 16×16 bitmap for the functoid image. No promises on fitness for particular business need, etc, etc. 🙂
-
March 20, 2007 at 6:18 AM #18048
You will need an escape character as another input incase there are some commas that the user still wants.
-
-
-
-
March 19, 2007 at 10:59 PM #18039
It can be done using few String functiods.
But what I feel is using a single simple Scripting functiod can solve this problem.
public string MyConcat(string param1)
{param1=param1.Replace(",","");
return param1;
}-
March 20, 2007 at 6:19 AM #18049
Yeah this is the simplest way.
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.