web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Split string after some specific characters

(6) ShareShare
ReportReport
Posted on by 351
How to split a string after a specific number of characters? For example, in the Work Description field, I have entered data, and it should be split after every 10 characters.
I have the same question (0)
  • Verified answer
    Khushbu Rajvi. Profile Picture
    20,643 Super User 2025 Season 2 on at
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,529 Super User 2025 Season 2 on at
    Hi,
     
    I hope below example helps
     
    procedure SplitStringEvery10Characters(InputText: Text): List of [Text]
    var
        ResultList: List of [Text];
        StartIndex: Integer;
        Chunk: Text;
    begin
        StartIndex := 1;
        while StartIndex <= StrLen(InputText) do begin
            Chunk := CopyStr(InputText, StartIndex, 10);
            ResultList.Add(Chunk);
            StartIndex += 10;
        end;
        exit(ResultList);
    end;
     
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
  • Suggested answer
    YUN ZHU Profile Picture
    95,741 Super User 2025 Season 2 on at
    Hi, hope the following helps as well.
    Dynamics 365 Business Central: How to split a string into fixed length (Error: The length of the string is xxx, but it must be less than or equal to xxx characters)
     
    Thanks.
    ZHU
  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at
    Please check the method in the below link 
     
     
    You can also use Text.Split new method.
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,639 Super User 2025 Season 2 on at
    Hello,
     
    I do agree with @Khushbu Rajvi.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,066

#2
YUN ZHU Profile Picture

YUN ZHU 658 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 595

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans