4.9 NWLayoutDescription Object

The NWLayoutDescription object references the layouts (object classes) in the NDS Schema. The layout defines how an entry can be created and stored in NDS, defining the field types associated with each entry.

Use this object to:

4.9.1 Object Diagram

Describes the hierarchy of various objects in NWLayoutDescription object

4.9.2 Name property

Gives the Layout (NDS Class) Name.

Syntax

object.Name

Type

String.

Attributes

Read-only.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each layout in nwdir.Layouts
    Print "The name of the layout: "&Layout.Name
    Print "The layout is a container "&Layout.Container
    Print "The entries can be created using
    NWEntries.Add command"&Layout.Creatable
    Print "The layout is removable "&Layout.Removable
    Print "The base layout is: "&Layout.BasedOn
Next

4.9.3 BasedOn property

Name of the base layout from which this layout has to be derived.

Syntax

object.BasedOn

Type

String.

Attributes

Read-write.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each layout in nwdir.Layouts
    Print "The name of the layout: "&Layout.Name
    Print "The layout is a container "&Layout.Container
    Print "The entries can be created using
    NWEntries.Add command "&Layout.Creatable
    Print "The layout is removable "&Layout.Removable
    Print "The base layout is: "&Layout.BasedOn
Next    

4.9.4 Fields property

Gives the collection of fields.

Syntax

object.Fields

Type

NWFieldDescriptions.

Attributes

Read-only.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.Login ("User", "Password")
Set Layouts = nwdir.Layouts
’ Display all the fields of user layout
Set userLayout = Layouts.Item ("User")
Set userFields = userlayout.Fields
Print "Total number of Fields in the User Layout: "&UserFields.Count

4.9.5 Container property

Identifies if the layout is a container layout.

Syntax

object.Container

Type

Boolean.

Attributes

Read-only.

Remarks

TRUE, if this layout represents a container.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each layout in nwdir.Layouts
    Print "The name of the layout: "&Layout.Name
    Print "The layout is a container "&Layout.Container
    Print "The entries can be created using
    NWEntries.Add command "&Layout.Creatable
    Print "The layout is removable "&Layout.Removable
    Print "The base layout is: "&Layout.BasedOn
Next

4.9.6 Creatable property

Returns or sets whether an entry of this layout can be created using NWEntries.Add.

Syntax

object.Creatable

Type

Boolean.

Attributes

Read-only.

Remarks

TRUE, if objects of this layout can be created.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each layout in nwdir.Layouts
    Print "The name of the layout: "&Layout.Name
    Print "The layout is a container "&Layout.Container
    Print "The entries can be created using
    NWEntries.Add command "&Layout.Creatable
    Print "The layout is removable "&Layout.Removable
    Print "The base layout is: "&Layout.BasedOn
Next

See Also

BasedOn property

4.9.7 Removable property

Specifies whether the current layout can be removed.

Syntax

object.Removable

Type

Boolean.

Attributes

Read-only.

Remarks

TRUE, if this layout can be removed from the NDS Schema.

Example

This example lists all the layouts and the details of each NDS layout.

Set nwdir=CreateObject("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each layout in nwdir.Layouts
    Print "The name of the layout: "&Layout.Name
    Print "The layout is a container "&Layout.Container
    Print "The entries can be created using
    NWEntries.Add command "&Layout.Creatable
    Print "The layout is removable "&Layout.Removable
    Print "The base layout is: "&Layout.BasedOn
Next