C/AL Code

Stan09
Member Posts: 63
Hi, all
I search for C/al intructions to break a specific step in "While" loop instruction.
If hou have any idea about it, pease share with me.
Thanks.
I search for C/al intructions to break a specific step in "While" loop instruction.
If hou have any idea about it, pease share with me.
Thanks.
0
Answers
-
Didn't come across BREAK (in case of Dataport, Report or XMLport)?
In other cases: can't you create a valid condition in the WHILE statement that make the loop end?0 -
Why not just like this?
WHILE condition1 DO BEGIN IF condition2 THEN BEGIN .... END; END;
"Money is likewise the greatest chance and the greatest scourge of mankind."0 -
Thanks you Einstein.net, it's work.0
-
y not try something like this?
record.find('-');
repeat
if record.age = 45 then
break;
until record.next <=0;
And the syntax requires that you use CurrReport.BREAK (not case sensitive). If you leave off the CurrReport. prefix, you will get the error message, namely the compiler asking you to define the unknown variable "break".smile always
shona
That which you seek inside is that which you find outside0 -
Another alternative
WHILE condition1 OR Condition2 DO BEGIN END;
orWHILE condition1 DO BEGIN REPEAT UNTIL Condition2 END;
There's no C/AL command to actually jump out of a loop. If you have to jump out, you'll have to create a function for the code inside and use EXIT.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions