Open topic with navigation

# setContent

The `setContent` method sets the content (the value of the `DRECONTENT` field) for a document or document section.

## Syntax

    setContent( content [, number] )

## Arguments

Argument | Description
--- | ---
`content` | (string) The content to set for the document or document section.
`number` | (number) The document section to modify. If you do not specify a number, the method modifies the active section. For the document object passed to the script's `handler` function, the active section is the first section (section 0). If you specify a number greater than the number of existing sections, additional empty sections are created.

## Examples

    -- Set content for section 0
    document:setContent("content0")

    -- Get document for section 1
    local section = document:getNextSection()

    -- Set content for section 1
    section:setContent("content1")

    -- Set content for section 7, and assign sections 2-6 to
    -- empty string if non-existent
    document:setContent("content7", 7)

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE 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 AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm