Limit characters in a report | Community
Skip to main content
Level 2
December 8, 2021
Solved

Limit characters in a report

  • December 8, 2021
  • 2 replies
  • 1328 views

Is it possible to have the project description only show the first 100 (or so) characters in a task report? The purpose is to have a quicker overall view with smaller rows.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ChloeRo

Yes, it's possible. This would be the code for a task report:

-----------

valueexpression=CONCAT(LEFT({project}.{description},100),"...")

valueformat=HTML

displayname=Project Description

-----------

You can omit the CONCAT() portion if you choose, so it would just be valueexpression=LEFT({description},100). The CONCAT is just there to add "..." to the end of the description, that way a user knows that there may be more text that they're just not seeing in the report.

If you want to get REALLY fancy and only add the "..." when the description is > 100 characters, you'd use this formula:

-----------

valueexpression=IF(LEN({project}.{description})>100,CONCAT(LEFT({project}.{description},100),"..."),LEFT({project}.{description},100))

valueformat=HTML

displayname=Project Description

2 replies

ChloeRoAccepted solution
Level 4
December 8, 2021

Yes, it's possible. This would be the code for a task report:

-----------

valueexpression=CONCAT(LEFT({project}.{description},100),"...")

valueformat=HTML

displayname=Project Description

-----------

You can omit the CONCAT() portion if you choose, so it would just be valueexpression=LEFT({description},100). The CONCAT is just there to add "..." to the end of the description, that way a user knows that there may be more text that they're just not seeing in the report.

If you want to get REALLY fancy and only add the "..." when the description is > 100 characters, you'd use this formula:

-----------

valueexpression=IF(LEN({project}.{description})>100,CONCAT(LEFT({project}.{description},100),"..."),LEFT({project}.{description},100))

valueformat=HTML

displayname=Project Description

Level 4
July 11, 2023

How would you get this to work for a custom text field that uses Data Rich Text?  I tried what you recommended above but it didn't work.

MegFlAuthor
Level 2
December 8, 2021

I have tried so many different variations, THIS WORKED. thank you so much!