The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

Hi

I have the query that takes query results in by Totals.

Code
Result = Query.Execute();
   
SelectionUpperItems= Result.Choose(QueryResultIteration.ByGroups);
   
While SelectionUpperItems.Next() Do

   UpperItem= SelectionUpperItems.UpperItem;
            
   SelectionDetailRecords = SelectionUpperItems.Choose();

   While SelectionDetailRecords.Next() Do

   ???????????
   
   EndDo;
      
EndDo;


In code where "???????????" noted. I want to write a command that will pass to the upper loop (SelectionUpperItems).

Command "Continue" will pass to the next iteration of inner loop.
Command "Raise" will return everything.

Which command can I use to pass to the Upper loop?

Any idea?

 
#2
People who like this: 0 Yes / 0 No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

Command "Break" ????

 
#3
People who like this: 0 Yes / 0 No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

I get it. Command "Break" works for loop where it is located.

 
#4
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Raise is used to raise an exception (abnormal execution termination).
Return is used to exit a function or procedure (in case of procedure no return value should be specified).
Continue is used to skip the current loop iteration and start the next iteration in loops.
Break is used to break the current loop (but not parent loops) and start execution of script that follows the end loop bracket.

 
#5
People who like this: 0 Yes / 0 No
Interested
Rating: 27
Joined: Apr 5, 2012
Company: 1TÇ Şirketi - Merv Bilgi İşlem Otomasyonu Yazılım Ltd. Şti.

thanks timofey I realized it ))).

 
Subscribe
Users browsing this topic (guests: 2, registered: 0, hidden: 0)