Removing commas using functoids

Home Page Forums BizTalk 2004 – BizTalk 2010 Removing commas using functoids

Viewing 2 reply threads
  • Author
    Posts
    • #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. 

    • #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.

      • #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.

         

         

        • #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. 🙂

          • #18048

            You will need an escape character as another input incase there are some commas that the user still wants.

    • #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;
      }

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