9 67 DOM_GET_FIELD

LANSA Technical

9.67 DOM_GET_FIELD

Þ Note: Built-In Function Rules.

Gets a field from an open data note using the field name. Either an alphanumeric field value or numeric field value will be returned for the field according to the field type.

The field types supported are the simple data types TYPE_TEXT,  TYPE_NUMBER, TYPE_TIME  and TYPE_TEXT_LIST as these are the closest types to the standard LANSA data types A (Alphanumeric), P (Packed) and S (Signed). The data will be converted from  the required field type and from LMBCS to EBCDIC for TYPE_TEXT,  TYPE_TIME and TYPE_TEXT_LIST fields.

For a TYPE_TEXT_LIST field, an entry position must be specified with a value of 0 being for the first entry in the test list field.  The return code is set to "NF" when the entry position requested is greater than the number of entries in the text list field.

If a field type of TYPE_TEXT is specified as an argument but the actual field type in the document is TYPE_TEXT_LIST, the first entry in the text list field will be returned by default with no error.

For use with

LANSA for i

YES

Visual LANSA for Windows

YES

Visual LANSA for Linux

NO

 

 

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Document/Data Note handle

4

4

 

 

2

A

Req

Field name in the document whose value is  to be returned.

1

65

 

 

3

N

Req

Field type in note:

1 = TYPE_NUMBER

2 = TYPE_TEXT

3 = TYPE_TIME

4 = TYPE_TEXT_LIST

1

7

0

0

4

N

Opt

Entry position for a TYPE_TEXT_LIST field.

1

15

0

0

 

 

Return Values

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Return code

OK = Field value successfully retrieved.

ER = Field not retrieved.

NF = Field value not found.

2

2

 

 

2

A

Opt

Alphanumeric field required for field type TYPE_TEXT, TYPE_TIME & TYPE_TEXT_LIST

1

256

 

 

3

N

Opt

Numeric field required for field type TYPE_NUMBER

1

15

0

9

 

 

Examples

Refer to these Domino Built-In Function Examples:

Example 2: Selecting documents from a Database using a view

Example 4: Updating Documents selected from a Browselist

Technical Notes

This Built-In Function uses the standard Lotus Notes APIs NSFFieldIsPresent, NSFFieldInfo, NSFFieldGetNumber, NSFFieldGetText, ConvertTIMEDATEToText, NSFFieldGetTime, NSFFieldGetTextListEntries and NSFFieldGetTextListEntry. All security and integrity issues related to the use of this Built-In Function are according to normal Lotus Notes API use for the current platform.