
You can implement a visual indicator or validation to enforce a character limit using JSON formatting. Here’s an example JSON snippet to truncate a multiline text field to 100 characters:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"txtContent": "=substring(@currentField, 0, 100) + if(length(@currentField) > 100, '...', '')",
"style": {
"white-space": "nowrap",
"overflow": "hidden",
"text-overflow": "ellipsis"
}
}
Please refer to the document
https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.