Limit Displayed Characters

Is there a way to limit the number of characters displayed in a text fiels and reveal the full contents when the row is expanded.

Hi @Jeff_Wright :slight_smile:
Yes there is a way! :slight_smile: if in a table i would use a button that change the value of a checkbox that is read by a formula in the original text value.
The new text (or the long one to say) is stored in another column and read at need, and the short preview of the text can be calculated with a formula that cut the text :slight_smile:

A similar button/formula setup can be done also in the canvas :slight_smile:

Hey @Jeff_Wright,
The easiest way that comes to mind is as follows:

  1. Text field (column) “FullText” is the full text.
  2. Column “ShortText” is a formula column with the formula:
Left(thisRow.FullText,25 )+"..."

Now just hide “FullText” on your table view.

This simply uses the ‘Left’ function to display the first “X” characters of the “FullText” field. https://coda.io/formulas#Left

In this example I chose “25” but you can choose however many chars you want.
I then appended “…” just to make it visually understood there is more text.

LMK if this doesn’t make sense and I can share a Doc.

2 Likes

Thanks for the replies but I wanted to know if there was a way without a fudge of having another column. But I guess there isn’t.

Dear @Jeff_Wright,

Ongoing with the elegant solution of @Shane_Robinson, you can put this in a button to expand the full text when pushing it and you are able to make a very user-friendly interface if you like so to do.

The nice part is that the buttons become self explanatory and you will be able to save a lot of space, remain focus on the subject and make it attractive to interact with your audience.

Update 2020-09-08

@Jean_Pierre_Traets how are you building the URL in the button and attaching the “modal” option?

When I copy your Doc, the URL in the button links back to your original Doc.

Correct. You can’t simultaneously display and not display the values in a column.
Think of the “ShortText” column as a variable to which you attach a ‘truncate’ filter for display.

Dear Shane,

I just noticed that my sample isn’t right, but I am in a hurry and can’t fix it now.

The solution in in this post:

Later on I will update mine too

Awesome! I’ll check it out.
:pray: