Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to make multi variable for Replace String in C/AL code

Posted on by 140

Hi guys,

Im new in c/al code, i build a Replace String Function and im trying to save the output in a Variable "ReplaceText" and use this variable for all conditions i have but it dose't work for all, just for one condition or one line, to be clear for you this my variables:

ReplaceText := ReplaceString(TEXT,'واحد مائة','مائة');
ReplaceText := ReplaceString(TEXT,'اثنان مائة','مائتان');
ReplaceText := ReplaceString(TEXT,'اثنان مائة','مئتان');

if you noted i repeat my variable to take all conditions but it doesn't work, if i remove the two line and i kept just first line its work perfectly, please help..

*This post is locked for comments

  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 on at
    RE: How to make multi variable for Replace String in C/AL code

    What do you replace string function does, if it replaces some characters from the original text then you should be passing that as parameter instead of TEXT.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans