Skip to main content
Question

var text - Placement/Efficiency

  • Sep 8, 2020 2:43 PM UTC
  • 0 replies
  • 69 views

I have a field titled Comments (Text) and a field titled Hover (Formula – Rich Text). For the purpose of concise formatting:
  • The Comments field is for text entry only, appearing on forms, but is not displayed in report view, for the purpose of concise formatting.
  • The Hover field does appear on reports: it shows a hyperlink that upon mouse-over, will reveal the comments in a popup bubble. I have accomplished this so far with the following in the Hover field:

"<div style=\"width:10px;\"> "& Left(Right([Comments],"["),0) &"</div>"&

"<a href='"&Dbid()&"?a=dr&rid="&[Record ID#]&"' title='"&[Comments]&"' target\n=\"_blank\" \"> Comments</div></a>"

However, due to an html-related limitation as I understand it, the comment shown upon hover is cutoff at the first appearance of an apostrophe (or single quotation). For example:

Comment says:

Hover only displays:

Documents to be sent to buyer's Florida address

Documents to be sent to buyer

Documents rec'd from seller 1 but not seller 2

Documents rec

 

One suggestion I found to resolve this was to use the SearchAndReplace function to replace the apostrophes with a character that html will allow:

var text apost = SearchAndReplace([Comments],"'","");
$apost

To be quite frank, I had no idea where to enter this…so I created another field, titled "Comment Transponder" (Formula – Rich Text). It does not appear on reports or forms, and serves only as a relay to remove the single apostrophes so that the apostrophe-less text can then be shown in full upon hover.

Comment says:

Comment Transponder Field says:

Hover now shows:

Documents to be sent to buyer's Florida address

Documents to be sent to buyers Florida address

Documents to be sent to buyers Florida address

Documents rec'd from seller 1 but not seller 2

Documents recd from seller 1 but not seller 2

Documents recd from seller 1 but not seller 2

 

Is there a more efficient way to do this (that would eliminate the need for the Comment Transponder field)? 



------------------------------
J H
------------------------------
This topic has been closed for replies.

For the HOVER field, enter the var before the main formula. Then, anywhere you would normally us the COMMENT field, use the variable

Example:

Without var: SearchAndReplace(,"'"," ") +

With var:
var text newa = SearchAndReplace(
,"'"," ");

$newa +

------------------------------
Blake Harrison - DataBlender.io
Quick Base Solution Provider
------------------------------