DELSection

DELImage

DELImage has been replaced with DELSection. DELImage and DELSection have same functionality; the only change is to the function name. The existing DELImage scripts will continue to function and will not require any modification.

Use this procedure/function to remove a section from a form. You can use the Paginate parameter to specify whether form pagination should occur after the section is deleted.

Syntax

DELSection (Section, Form, Group, Paginate)

Parameter

Description

Section

Enter the name of the section.

Form

Enter the name of a form in the form set. The default is the current form.

Group

Enter the name of a group to contain the specified form. The default is the current group.

Paginate

(Optional) This parameter follows the Group parameter. If you enter anything other than a zero (0), it tells the system that you want form pagination to occur upon the successful removal of the section.

If you omit this parameter or enter zero (0), the section is deleted, but no other sections are moved to occupy the space left vacant. Subsequent form re-pagination and the application of section origins may change the layout of the form.

Here is an example:

DELSection( "mySection", , , 1)

This example omits the Form and Group parameters, but does include the Paginate parameter.

Note: If you enter zero (0) or omit this parameter, the function works as it prior to version 11.2.

The default is zero (0).

The system optionally returns one (1) on success or zero (0) on failure.

This procedure removes the specified section from the form. It cannot delete the current section. You can delete any section on the current form, as long as it is not the current section.

If the deleted section is the only section on that page, the system also removes the page from the form. If other sections occur on that page, space occupied by the deleted section is left blank.

Note Removing a section means that all data associated with that section will be lost.

This procedure does not update the displayed form. Use the Refresh procedure to update the display.

Example

Here are some examples:

Procedure

Result

Explanation

DELSection( "SEC")

1 or 0

Delete the specified section from the current form. This assumes that the named section is not the current section.

DELSection( "SEC\3", ,"GRP" )

1 or 0

Locate the third occurrence of SEC in the specified GRP. If this is not the current section, delete the section.

DELSection( “SEC\#3”,’”GRP”) 1 or 0 Locate the third logical occurrence of the SEC in the specified GRP. This differs from the above example in the case of a multi-page section – for multipage sections, the third occurrence could be the 3 page of the content for the same instance of the section. The third logical occurrence is the third instance of the multipage section within the GRP.

See also