Open topic with navigation

# getNextSection

The `getNextSection` method returns the next section of a document (if the document has been divided into sections).

The document object passed to the script's `handler` function represents the first section of the document. This means that the methods described in this section read and modify only the first section.

Calling `getNextSection` on the LuaDocument passed to the `handler` function will always return the second section. To perform operations on every section, see the example below.

When a document is divided into sections, each section has the same fields. The only difference between each section is the document content (the value of the `DRECONTENT` field).

## Syntax

    getNextSection()

## Returns

(LuaDocument) A LuaDocument object that contains the next DRE section.

## Example

To perform operations on every section, use the following script.

    local section = document
    while section do
    	-- Manipulate section
    	section = section:getNextSection()
    end

© Copyright 2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm