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
Yes there is a way! 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
A similar button/formula setup can be done also in the canvas
Hey @Jeff_Wright,
The easiest way that comes to mind is as follows:
- Text field (column) âFullTextâ is the full text.
- 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.
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.