Forum Discussion
PeterMonahan1
2 days agoQrew Trainee
This is what I've done in a similar situation.
var text descripText = [Your Text Field];
var text leftText = NotRight(Left($descripText, 145), " ");
var text rightText = NotLeft($descripText, Length($leftText));
If(Length($descripText) < 150,
$descripText,
$leftText&
"<details style='rotate: 180deg'>"&
"<summary style='rotate: 180deg; cursor: pointer;'>Show/Hide</summary>"&
"<div style='rotate: 180deg'>" & $rightText & "</div>"&
"</details>"
)
Mine uses the html summary element with the text Show/Hide. The show hide could be changed to an ellipsis and I believe there are css methods of hiding the arrow built in to the summary tag.
The style='rotate: 180deg' is used on the details tag to make the summary tag display below the $rightText when it's clicked to reveal the full text. It's likewise used on the summary tag and the div wrapping $rightText to flip their contents to display properly.