• Use conditions
  • Using the LooperBreakIndex function
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
LooperBreakIndex (Function)
In french: ZoneRépétéeIndiceRupture
From version 28 (75), LooperBreakSubscript is kept for backward compatibility. This function is replaced by LooperBreakIndex.
Returns the index of the break header and footer for a given break in a Looper control:
  • The index of the header for a given break also corresponds to the index of the first row in this break.
  • The index of the footer for a given break also corresponds to the index of the last row in this break.
// The LOOP_Invoices Looper control lists the invoices of each customer
// A break is performed for each customer
// The break footer contains the TotalInvoice control
// linked to the ATT_Total attribute
// This control displays the total of all invoices for each customer
MyRow is int = 1 // Beginning of the Looper control
BreakHeader is int // Index of break header
BreakFooter is int // Index of break footer
Index is int // Index of rows
Total is int // Total for each break
// Calculate the totals for the entire Looper control
WHILE MyRow <= LOOP_Invoices.Count
// Index of the current break
BreakHeader = LooperBreakIndex(BRK_CustHeader, MyRow)
BreakFooter = LooperBreakIndex(BRK_CustFooter, MyRow)
// Browse the rows found in the current break
// to calculate the total
FOR Index = BreakHeader TO BreakFooter
Total += ATT_Value[Index]
// Assign the total
ATT_Total[BreakFooter] = Total
// Go to the next break
MyRow = BreakFooter + 1
<Result> = LooperBreakIndex(<Break header/footer> [, <Index>])
<Result>: Integer
  • Index of the specified break header/footer in the break containing the row whose index is <Index>,
  • 0 if an error occurs. To get more details on the error, use ErrorInfo with the errMessage constant.
<Break header/footer>: Character string
Name of the break header or footer to be used.
This parameter can correspond to:
  • the name of the break header or break footer directly.
  • the <Name of Looper control>.<Name of break header/footer>
<Index>: Optional integer
Index of one of the rows in the desired break.
If this parameter is not specified, the index of the break header/footer in the break containing the current row is returned.

Use conditions

LooperBreakIndex can be used on:
  • a Looper control based on a data file,
  • a Looper control populated programmatically.
WEBDEV - Browser code This function is not available for Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.

Using the LooperBreakIndex function

It is recommended to call LooperBreakIndex once the Looper control is displayed in its entirety. Otherwise, the indices returned by LooperBreakIndex may not correspond to the actual indices displayed in the Looper control.
Business / UI classification: UI Code
Component: wd280obj.dll
Minimum version required
  • Version 10
This page is also available for…
Click [Add] to post a comment