Discussions

Expand all | Collapse all

How to shorten the display of a text field?

  • 1.  How to shorten the display of a text field?

    Posted 19 days ago

    I have a comments field that is long enough to really mess up the table view, so I want it to only display the first 20 words unless you click into it. How can I do that?

    I tried to do use this formula to shorten the view of my "appt. comments" text field in my table. 

    Left([Appt. Comments],20)

    However, I received this message "Formula error
    A formula may not contain a reference to itself directly or indirectly through another formula."

    Any idea on how to do this?



    ------------------------------
    Meagan McOlin
    ------------------------------


  • 2.  RE: How to shorten the display of a text field?

    Posted 19 days ago
    You would need to have a separate abbreviated field to use on reports.  if you want to get fancier there is syntax to have a 'more' link appear to allow drilling into the record to see the full record.  There is also syntax possible to allow hover text to see the full note

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: How to shorten the display of a text field?

    Posted 19 days ago
      |   view attached
    Hi Mark,

    What I need is to shorten the comment display on the table view. So that it doesn't make the record/row it is on so long. I want the record height to be uniform and the comments section is preventing that right now.

    ------------------------------
    Meagan McOlin
    ------------------------------



  • 4.  RE: How to shorten the display of a text field?

    Posted 18 days ago
    Mark, what is the hover syntax? Or is that something complicated enough we need to take it offline and consult?

    ------------------------------
    Mike Tamoush
    ------------------------------



  • 5.  RE: How to shorten the display of a text field?

    Posted 18 days ago
    Hover syntax is deeper knowledge than I have. :) But I would love to learn.

    ------------------------------
    Meagan McOlin
    ------------------------------



  • 6.  RE: How to shorten the display of a text field?

    Posted 18 days ago
    Try this.  The left 20 character should be a Clickable Hyperlink to view the record with "hover text" to see the whole text field.



    var text Words = Left([Appt. Comments],20);
    var text URL = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];
    var text Hyperlink = "<a href=" & $URL & ">" & $Words & "</a>";

    // then define the hover text
    // Note!!, the hover text must be enclosed in a single ' character as the first space will stop the text.
    // no html allowed in the hover text
    // Use \n for line feed

    var text HoverWords =
    "'"
    & [Appt. Comments]
    & "'";

    // this below will always be the same
    "<div>" & "<span title=" & $HoverWords & ">" & $Hyperlink & "</b></span>" & "<div>"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------