Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Truncate Description in a View - Text Mode?

Avatar

Level 8

Is it possible to use text mode to truncate the description in a view to make the viewing and scrolling experience better? Does anyone have the text mode they could share? Also, if I were to apply this text mode, would I lose the ability to in-line edit the description field?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Try...

displayname=Description Summary

textmode=true

usewidths=true

valueexpression=IF(LEN({description})>140,CONCAT(SUBSTR({description},0,139)),{description})

valueformat=HTML

width=250

View solution in original post

9 Replies

Avatar

Level 10

Hi Sydney,

@NRYN R - inactive‚ on his lovely WF Pro site has the code you need! 🙂 But yes, you would lose the ability to inline edit because you are not looking at the field itself.

displayname=Description Summary

textmode=true

usewidths=true

valueexpression=IF(LEN({description})>140, CONCAT(SUBSTR({description},0,139),"... (open issue for more)"), {description})

valueformat=HTML

width=250

For all of his great examples: https://wf-pro.com/home/training/text-mode-examples/

Avatar

Level 8

Thank you Anthony! One follow up, how do I get rid of the (open issue for more) ? I tried but I broke it! 😖

and thank you for the additional resource! I will poke around in there!

Avatar

Correct answer by
Level 10

Try...

displayname=Description Summary

textmode=true

usewidths=true

valueexpression=IF(LEN({description})>140,CONCAT(SUBSTR({description},0,139)),{description})

valueformat=HTML

width=250

Avatar

Level 1

Is it possible to do this with a custom field that's a part of a custom form?

Avatar

Level 10

Hi Alan - you should be able to, although I have never tried LEN in a calculated field. The biggest difference will be getting rid of the brackets and doing the real name of the field instead of the tech name. Try...

IF(LEN(Description)>140,CONCAT(SUBSTR(Description,0,139)),Description)

Avatar

Level 1

Hey Anthony -

Thanks for the quick reply.

The field I'm working with is a Paragraph Text Field (format = text) and the name of the field is "Please describe your licensing clearance needs".

I tried removing the curly brackets and entered the below in text mode. After saving changes, the column appears blank in the report, which I'm guessing means I'm doing something wrong:

displayname=Please describe your licensing clearance needs

textmode=true

usewidths=true

valueexpression=IF(LEN(Please describe your licensing clearance needs)>140,CONCAT(SUBSTR(Please describe your licensing clearance needs,0,139)),Please describe your licensing clearance needs)

valueformat=HTML

width=250

Any ideas? Could this have to do with the fact that the field exists on a custom form in the issue, rather than the default "Overview" form that appears on every issue?

Thanks!

Avatar

Level 10

Hi - If you are doing this as a calculated field on a custom form, you don't need all the extra stuff. You just need the formula. The code you have up there is still for a custom field in a report.

If you want for a calculated field on a custom form, you just need...

IF(LEN(Please describe your licensing clearance needs)>140,CONCAT(SUBSTR(Please describe your licensing clearance needs,0,139)),Please describe your licensing clearance needs)

If you still want a custom field in a report, you will need the bracets but you were probably missing the DE: for custom fields.

displayname=Please describe your licensing clearance needs

textmode=true

usewidths=true

valueexpression=IF(LEN({DE:Please describe your licensing clearance needs})>140,CONCAT(SUBSTR({DE:Please describe your licensing clearance needs},0,139)),{DE:Please describe your licensing clearance needs})

valueformat=HTML

width=250

Hope that helps and sorry for any confusion.