Using JSON to set a character limit for MS365 sharepoint multi-line text column values

Thilina Tantirigama 116 Reputation points
2022-05-25T04:28:59.107+00:00

I have not found the answer to this. Can you please advise if this is possible?

Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Tong Zhang_MSFT 9,256 Reputation points
    2022-05-26T06:14:05.193+00:00

    Hi @TantirigamaThilina-7057,

    Per my research and testing, there is no JSON that can set character limits for multi-line text column values . However, you can use the following JSON to limit the number of characters displayed in the list:

    {  
       "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",  
       "elmType": "div",  
       "txtContent": "=substring(@currentField, 0, 10) + ''"  
    }  
    

    My test result:
    205733-image.png
    205714-image.png


    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.


    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.