This topic contains 6 replies, has 0 voices, and was last updated by rnedelkow 9 years ago.

  • Author
    Posts
  • #5424

    jmcadams

    Anyone have any luck with concatentating case messages in a saved search? I am working on a saved search for cases and each MESSAGE is listed individually (creating a row for each message) and I’m not seeing a way to group them all into one cell.

    I need to find a way where each case has one row and all related messages (to the case) are combined into one cell. Any suggestions?
    This is a cached copy. Click here to see the original post.

  • #5425

    Olivier Gagnon NC

    I don’t think that’ll be possible purely in SQL. You would need to use scripting to paste/append messages into a hidden field on the Case as they come in. Then in the search you can just output this single, massive field. It is possible though the character count will pop anything NS can handle. Could happen in theory.

  • #5426

    cdelacruz

    Hello,

    Try:Results tab > Columns subtab:Number | Summary Type = Group
    Formula (Text) | Summary Type = Maximum | Formula: ns_concat({message})

    Note: Would not work if a case contains many messages.

  • #5427

    Olivier Gagnon NC

    Rreeeeaally

    Can you expand a little on what this ns_concat() does exactly?

  • #5428

    cdelacruz

    It works the same way as the wm_concat function in Oracle

  • #5429

    al3xicon

    See also: http://blog.prolecto.com/2014/05/16/…-saved-search/

  • #5430

    rnedelkow

    The ns_concat() method might reach the character limit of the text field as Olivier Gagnon NC said, if you are concatenating a lot of messages.

You must be logged in to reply to this topic.