4.11 NWFieldType Object

The NWFieldType object references the field (class attributes) in NDS. The fields are first added to NDS, and then attached to a specified layout when extending the Schema.

Use this object to:

4.11.1 Object Diagram

Describes the hierarchy of various objects in NWFieldType object

4.11.2 Name property

Gets the name of the field.

Syntax

object.Name

Type

String.

Attributes

Read-only.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS:\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each FieldType in nwdir.FieldTypes
   Print "The name: "&FieldType.Name
   Print "The NDS syntaxtype: "&FieldType.SyntaxType
   Print "The NDS syntax name: "&FieldType.SyntaxName
   Print "The VB script datatype: "FieldType.Type
    Print "The field is single-valued:"&FieldType.SingleValued
   Print "The field is removable: "&FieldType.Removable
 Next

4.11.3 Type property

Gives the VBScript data type for the field.

Syntax

object.Type

Type

Integer.

Attributes

Read-only.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS:\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For Each FieldType in nwdir.FieldTypes
   Print "The name: "&FieldType.Name
   Print "The NDS syntaxtype: "&FieldType.SyntaxType
   Print "The NDS syntax name: "&FieldType.SyntaxName
   Print "The VB script datatype: "FieldType.Type
    Print "The field is single-valued:"&FieldType.SingleValued
   Print "The field is removable: "&FieldType.Removable
Next

4.11.4 SyntaxType property

Returns the NDS syntax type.

Syntax

object.SyntaxType

Type

Integer.

Attributes

Read-only.

Remarks

Could be any of the syntax constants. See Syntax Type Constants for more details.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each FieldType in nwdir.FieldType
    Print FieldType.Name
    Print FieldType.SyntaxType
    Print FieldType.SyntaxName
    Print FieldType.Type
    Print FieldType.SingleValued 
    Print FieldType.Removable
Next

SyntaxName property

Returns the name of the NDS syntax.

Syntax
object.SyntaxName

Type

String.

Attributes

Read-only.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For Each FieldType in nwdir.FieldType
    Print FieldType.Name
    Print FieldType.SyntaxType
    Print FieldType.SyntaxName
    Print FieldType.Type
    Print FieldType.SingleValued 
    Print FieldType.Removable
Next

4.11.5 Removable property

Indicates whether this field is removable or not from the NDS Schema.

Syntax

object.Removable

Type

Boolean.

Attributes

Read-only.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS:\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each FieldType in nwdir.FieldTypes
   Print "The name: "&FieldType.Name
   Print "The NDS syntaxtype: "&FieldType.SyntaxType
   Print "The NDS syntax name: "&FieldType.SyntaxName
   Print "The VB script datatype: "FieldType.Type
    Print "The field is single-valued:"&FieldType.SingleValued
   Print "The field is removable: "&FieldType.Removable
Next

4.11.6 SingleValued property

Indicates whether a field of this type can have multiple values or not.

Syntax

object.SingleValued

Type

Boolean.

Attributes

Read-only.

Remarks

TRUE, if this field is a single valued field.

Example

This example lists the details of each NDS field type.

Set nwdir=CreateObject ("UCX:NWDIR")
nwdir.FullName = "NDS:\\ACMECorporation\Sales\New York"
nwdir.Login ("Test user", "Test password")
For each FieldType in nwdir.FieldTypes
   Print "The name: "&FieldType.Name
   Print "The NDS syntaxtype: "&FieldType.SyntaxType
   Print "The NDS syntax name: "&FieldType.SyntaxName
   Print "The VB script datatype: "FieldType.Type
    Print "The field is single-valued:"&FieldType.SingleValued
   Print "The field is removable: "&FieldType.Removable
Next

4.11.7 PublicRead property

Indicates whether this field type can be read without read privileges being assigned.

Syntax

object.PublicRead

Type

Boolean.

Attributes

Read-only.

Remarks

TRUE, if this field can be read by all.

Example

This example lists whether the fields types are PublicRead or not.

Sub Test_PublicRead
    set nwdir=createobject("UCX:NWDIR")
    Set fieldtypes = nwdir.fieldtypes
    For Each fieldtype In fieldtypes
        Print fieldtype.name &"     " &fieldtype.PublicRead
    Next
End Sub