Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / How to use subStr() to...
Finance forum
Answered

How to use subStr() to increment string value by 1?

Posted on by 99
I have a string value 
myStr = /490000000002/; (it's a harcoded value the values would be different everytime)
 
i need to increment its value by 1, how do i do it?
please help
  • Verified answer
    Mohamed Amine Mahmoudi Profile Picture
    Mohamed Amine Mahmoudi 9,170 Super User 2024 Season 2 on at
    How to use subStr() to increment string value by 1?
    Hi,
     
    you can convert the string to number and then add 1 then reconvert to string again.
    Int64  myInt;
    Str    myStr;
    
    myStr = '490000000002';
    myInt = str2Int64(myStr) + 1;
    myStr = int642Str(myInt);
    Best regards,
    Mohamed Amine MAHMOUDI

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,137 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans