Dynamics Connector 12.11

# 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)

© Copyright 2022 Micro Focus or one of its affiliates
Version 12.11 | Last updated February 2022

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL Dynamics Connector 12.11

Topic Title: setContent