Method Community

 

Retain Style in Table View

Last post 02-16-2016 11:25 AM by pdx971. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-15-2016 10:45 AM

    Retain Style in Table View

    Hello,

    I have a customized table on our homepage dashboard which shows open cases. I have customized the Interal Comments field using the following SQL statement:

    '<b>' + ISNULL(viewCases.Subject,'') + '</b><br />' + ISNULL(viewCases.InternalComments,'')

    I want to have both the cases.Subject and cases.InternalComments shown together in the same field.

    This is working, except that when the internal comments field is greater than three lines, and the "Show More" link is displayed, the html style is removed, making it harder to read. I still want both pieces of information in the table cell, but I want to retain the style I have specified in the SQL.

    When I do click on the "Show More" link to expand the cell, the style is applied. But when I click on the "Show Less" link, the style is removed. I do not want the style removed.

    Is this something I can modify?

    Thanks for the help.

  • 02-16-2016 11:15 AM In reply to

    Re: Retain Style in Table View

    Hello,

    Unfortunately we do not have access to change the behaviour of "Show Less/Show More" has on SQL/HTML as it's hard coded within the Grids code.

    But I believe I have a suitable work around for us. Why don't we disable the "Show Less/Show More" from the Grid completely? Anything over the limit of 200 characters which is when the "Show Less/Show More" seem to appear we truncate and append "..." this will keep the Grid looking clean and still allow for a quick peek of the internal comments.

    I wrote this code here, give it a shot:

    --

    (CASE
    WHEN LEN(viewCases.InternalComments) < 250
    THEN '<b>' + ISNULL(viewCases.Subject,'') + '</b><br />' + ISNULL(viewCases.InternalComments,'')
    ELSE '<b>' + ISNULL(viewCases.Subject,'') + '</b><br />' + LEFT(viewCases.InternalComments, 200) + '...'
    END)

    --

    It appears as such:

    -- Mortaza

    Morty Barighzaai
    Customer Success Manager
    Method:CRM
  • 02-16-2016 11:25 AM In reply to

    Re: Retain Style in Table View

    Hi Mortaza,

    Thanks for writing this code.

    That works better. Much appreciated.

Page 1 of 1 (3 items)