Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enabled for | Public preview | General availability |
---|---|---|
Admins, makers, marketers, or analysts, automatically | ![]() |
![]() |
Business value
The IncStr
method on Text
types lets you increase a positive number or decrease a negative number inside a string variable by 1. This method is useful when you handle iterations that involve number series. If you wanted to change the number by more than 1, you had to write extensive custom logic. To simplify these scenarios, the IncStr
method now supports an optional increments
parameter to change the number by more than 1.
Feature details
The new overload of the IncStr
method supports increasing or decreasing a number in a string variable by any amount. With this method, you can increment number series or similar series by more than one position in a single step.
To decrease a positive number, use a try
function to handle cases where the string can't decrease further. When you decrease a number, the method adds leading zeros as needed.
The following example shows how to increment the integer 99 in the AText
string variable to 109 in one call by using the new IncStr
method overload with an increment value of 10.
Geographic areas
Visit the Explore Feature Geography report for Microsoft Azure areas where this feature is planned or available.
Language availability
Visit the Explore Feature Language report for information on this feature's availability.
Tell us what you think
Help us improve Dynamics 365 Business Central by discussing ideas, providing suggestions, and giving feedback. Use the forum at https://aka.ms/bcideas.