Skip to main content
Question

display first few lines of text in pdf report

  • August 7, 2019
  • 0 replies
  • 96 views


I have a multi-line text (comment) field - some entries are quite long.  For a pdf report, I would like to display only the first few lines.  Is this possible?
This topic has been closed for replies.

AdamKeever1
Forum|alt.badge.img+2
  • Quickbase Alumni
  • August 7, 2019
You can use a formula field and the left function to show a specific number of characters (lines):



Forum|alt.badge.img+12
  • Quickbase Alumni
  • August 7, 2019
I typically use this formula when needing to show a partial set of characters from a multi-line text field.

If(Length([Comments])<180,[Comments],Left([Comments],180)&"<br><a href='"&URLRoot()&"db/"&Dbid()&"?a=dr&rid="&[Record ID#]&"&dfid=10' title='" &
List(" ",Part([Comments],1," ' "),Part([Comments],2," ' "),Part([Comments],3," ' "),Part([Comments],4," ' ")) & "'>more</a>")


What this does is to identify if the length of the field content is more than a specified # of characters long; and then displays the first number of characters, with a hyperlink option more which will show the rest of the characters in a modal that displays when you hover on the more link.  You can change the length of characters depending on your requirements.

There are some other techniques if you need more complexity; but this is the most common form I use for this.

  • Author
  • Quickbase Alumni
  • August 7, 2019
Thank you both.  Much appreciated.