Expand my Community achievements bar.

SOLVED

Is there a way to display only the last (any number) of characters in a custom text field?

Avatar

Level 4

Hi community, we have a custom field in a task custom form to capture notes. Is there a way to only display the last xxxx number of characters entered, and not the whole content entered in the field? as more notes get entered, it is getting quite long when it displays in a report.

I know how to do that on the Last Note - Note Text from the updates, but cannot figure out in a custom field.

Thank you!

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

Try this:

valueexpression=CONCAT(RIGHT({DE:Multimedia Notes},2100))

View solution in original post

6 Replies

Avatar

Level 8

Update: use this valueexpressionfor first x characters:

valueexpression=CONCAT(LEFT({DE:Custom Field},100),"...")

_______

Here is code I have for one of my custom fields, let me know if this works for you. Just replace the 5 instances of KR Status Rationale to be your custom field name.

displayname=

linkedname=direct

namekey=KR Status Rationale

querysort=DE:KR Status Rationale

textmode=true

valueexpression=IF(LEN({DE:KR Status Rationale})>140, CONCAT(SUBSTR({DE:KR Status Rationale},0,139),"..."))

valuefield=KR Status Rationale

valueformat=HTML

Avatar

Level 4
Thank you Adina, that worked! But what if I need it to display the last xxx characters? I tried the below value expression as a test. I get the last 2100 characters, but is there a way to get the last xxx characters regardless of the length? valueexpression=IF(LEN({DE:Multimedia Notes})>140, CONCAT(SUBSTR({DE:Multimedia Notes},900,3000)))

Avatar

Correct answer by
Level 8

Try this:

valueexpression=CONCAT(RIGHT({DE:Multimedia Notes},2100))

Avatar

Level 8

Just wanted to update my code that I provided for the first x characters, since I found a new way using left instead of SUBSTR:

valueexpression=CONCAT(LEFT({DE:Custom Field},100),"...")