IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Carriage return in "pub.string:messageFormat"

  • 1.  Carriage return in "pub.string:messageFormat"

    Posted Tue October 12, 2010 06:17 PM

    Hi guys.

    I really need the help of the community on this one. My problem is pretty simple:
    I’m iterating over a list of objects (containing 3 strings each, name ID and comment) with a loop, and trying to stick them all in the same string. So far, so good. i’m using messageFormat to format my 3 strings that way: {0} ({1}) - {2}. (0:name, 1:id and 2:comment).

    Pseudo code to explain:

    Loop over /comments{
    commentFormated = messageFormat(comment.name,comment.ID,comment.text);
    finalString = concat(finalString,commentFormated);
    }

    The problem is that I’d love to insert a carriage return at the end of each line, to have something like this:
    Name (ID) - Comment
    Name (ID) - Comment
    Name (ID) - Comment

    For now, i just have:
    Name (ID) - CommentName (ID) - CommentName (ID) - Comment…

    And I just can’t find the way. I guess it’s pretty simple (if even possible), but I’d appreciate if you could give me a hint :wink:

    Thanks in advance!


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General