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

  • Author
    Posts
  • #5424 Score: 0

    jmcadams
    • Contributions: 0
    • Level 1

    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 Score: 0

    Olivier Gagnon NC
    • Contributions: 0
    • Level 1

    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 Score: 0

    cdelacruz
    • Contributions: 0
    • Level 1

    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 Score: 0

    Olivier Gagnon NC
    • Contributions: 0
    • Level 1

    Rreeeeaally

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

  • #5428 Score: 0

    cdelacruz
    • Contributions: 0
    • Level 1

    It works the same way as the wm_concat function in Oracle

  • #5429 Score: 0

    al3xicon
    • Contributions: 0
    • Level 1

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

  • #5430 Score: 0

    rnedelkow
    • Contributions: 0
    • Level 1

    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.