DOCUMENTS 5 - PortalScripting API
Public Member Functions | Public Attributes | List of all members
RetrievalField Class Reference

This class represents one search field or one conditon within a DOCUMENTS search request. More...

Public Member Functions

 setDefault (String value, boolean writeProtect)
 Place a default value in a search field. More...
 

Public Attributes

String compOp
 The comparison operator / relational operator as a String. More...
 
String defaultValue
 The actual default value of the field (read-only). More...
 
boolean defValWriteProt
 The UI write protection state of the defautValue (read-only) More...
 
String label
 The localized label of the field. Maybe an empty String. More...
 
String name
 The name of the look-up field (read-only). More...
 
number type
 The field type coded as an integer (read-only). More...
 
String valueExpr
 The value sought after. If the operator is "~", it can be a composed value expression. More...
 
Field Types

These constants are equally available in each instance of RetrievalField and in the constructor object.

Integer FT_STRING
 Integer code for the field type "String" (single line)
 
Integer FT_TEXT
 Integer code for the field type "Text" (multiple lines)
 
Integer FT_BOOL
 Integer code for the field type "boolean".
 
Integer FT_DATE
 Integer code for the field type "Date".
 
Integer FT_ENUM
 Integer code for the field type "Enumeration" (not extensible)
 
Integer FT_NUMERIC
 Integer code for the field type "Numeric".
 
Integer FT_REFERENCE
 Integer code for the field type "File reference".
 
Integer FT_HISTORY
 Integer code for the field type "History".
 
Integer FT_DOUBLE_LIST
 Integer code for the field type "Double select list".
 
Integer FT_CHECKBOX
 Integer code for the field type "Checkbox".
 
Integer FT_SEPARATOR
 Integer code for the field type "Horizontal seperator" (actually ignored by the retrieval system)
 
Integer FT_USER_DEFINED
 Integer code for the field type "User defeined".
 
Integer FT_TEXT_FIXED_FONT
 Integer code for the field type "Text (fixed font)".
 
Integer FT_E_MAIL
 Integer code for the field type "E-mail address".
 
Integer FT_URL
 Integer code for the field type "URL".
 
Integer FT_TIMESTAMP
 Integer code for the field type "Time stamp".
 
Integer FT_FILING_PLAN
 Integer code for the field type "Filing plan".
 
Integer FT_HTML
 Integer code for the field type "HTML".
 
Integer FT_FILING_STRUCTURE
 Reserved constant for a possible future use.
 
Integer FT_GADGET
 Integer code for the field type "Gadget" (actually ignored by the retrieval system)
 
Integer FT_UNDEFINED
 Integer code for fields with an unspecified data type. More...
 

Detailed Description

This class represents one search field or one conditon within a DOCUMENTS search request.

Since
DOCUMENTS 4.0c HF2
See also
DocQueryParams

Member Function Documentation

◆ setDefault()

RetrievalField::setDefault ( String  value,
boolean  writeProtect 
)

Place a default value in a search field.

A "FillSearchMask" script-exit can call this function to place default values in an extended search formular. Calls from other scripts will rather deposit a "LastError" message in the superior DocQueryParams object.

Parameters
valueThe initial text in the search field. Dates and numbers must be formatted with the current user's locale settings.
writeProtectIndicates, if the user interface shall write-protect the field.
Returns
No return value.
Note
The DocumentsServer only forwards these parameters to the client application. If a special client implementation will ignore them, the server would not enforce the defaults, because such a behaviour would confuse users.
Calling this function does not modify the "empty" state in terms of DocQueryParams.getSearchField().
Since
DOCUMENTS 4.0d

Member Data Documentation

◆ compOp

String RetrievalField::compOp

The comparison operator / relational operator as a String.

For a list of valid operators see the page: Using filter expressions with FileResultSets.

Note
The access to this property is restricted. Only the "OnSearchScript" can effectively modify it. Modifying the operator is risky, since it can produce unexpected results from the user's point of view.
Since
DOCUMENTS 4.0c HF2

◆ defaultValue

String RetrievalField::defaultValue

The actual default value of the field (read-only).

Remarks
Actually only the "FillSearchMask" exit can attach default values (see setDefault()). There might exist another method in a future version. To improve upward compatibility a "FillSearchMask" script may check for external default values, and leave them unmodified.
Since
DOCUMENTS 4.0d

◆ defValWriteProt

boolean RetrievalField::defValWriteProt

The UI write protection state of the defautValue (read-only)

See also
setDefault()
Since
DOCUMENTS 4.0d

◆ FT_UNDEFINED

Integer RetrievalField::FT_UNDEFINED

Integer code for fields with an unspecified data type.

This constant has been added for completeness. Fields in this state should never appear in the retrieval system.

◆ label

String RetrievalField::label

The localized label of the field. Maybe an empty String.

Remarks
If the field has not got a label, DOCUMENTS falls back to the technical name. So there is no need to specify a label always. A few reserved internal fields, which are usualli never displayed on a search mask or a hit list, also come along without any label. An example is the special field "Search_EEIFileNr", which DOCUMENTS uses internally to implement a version listing for an ENTERPRISE.i file.
Since
DOCUMENTS 4.0c HF2

◆ name

String RetrievalField::name

The name of the look-up field (read-only).

Since
DOCUMENTS 4.0c HF2

◆ type

number RetrievalField::type

The field type coded as an integer (read-only).

See the enumeration constants in this class.

Since
DOCUMENTS 4.0c HF2

◆ valueExpr

String RetrievalField::valueExpr

The value sought after. If the operator is "~", it can be a composed value expression.

Note
The access to this property is restricted. Only the "OnSearchScript" can effectively modify it. Modifying the value is risky, because it can produce unexpected results from the user's point of view. Within a "FillSearchMask" exit this property contains always an empty string.
Since
DOCUMENTS 4.0c HF2

This documentation refers DOCUMENTS 5.0e (2105).
Created at 11-09-2019. - © 1998-2019 otris software AG, Königswall 21, D-44137 Dortmund. support@otris.de