Syntax
KEYONLY
The KeyOnly command option is not supported by applications deployed to Windows.
The KeyOnly command option offers performance improvements for some uses of the LookUp and Determine commands on MCP-based systems.
For MCP-based systems, the KeyOnly option increases the efficiency of these commands by limiting data retrieval to keys only for Lookup commands, and keys and attributes declared in the Profile description for Determine commands. This eliminates unnecessary I/O operations when other attributes are not required.
KeyOnly can be used in conjunction with the Multi and Serial command options. It cannot be used with the Secure option.
Valid Uses of KeyOnly
The KeyOnly command option can be specified on any of the following commands:
Command | Platform |
---|---|
Determine Actual Profile | MCP |
Determine Back Profile | MCP |
Determine Every Profile | MCP |
Determine From Profile | MCP |
Determine Group Profile | MCP |
Determine Last Profile | MCP |
ForEach | MCP |
LookUp dataname component | Standard or Table Component for MCP |
LookUp Every component | Standard or Table Component for MCP |
Results of a KeyOnly read
Data returned on a KeyOnly retrieval includes:
Items returned | For | Platform |
---|---|---|
Profile Key Attributes | Determine commands | MCP |
Profile Attributes | Determine commands | MCP only |
Standard Component Key | LookUp Commands | MCP |
Table Component Key | LookUp Commands | MCP only |
Maint System Attribute | Determine using Automaint Profiles LookUp using Standard Components LookUp using Table Components | MCP MCP MCP Only |
All other non-key fields are filled with the Glb.High value.
Note: Attempting to access non-key fields from a record read with the KeyOnly command option, while syntactically valid, might produce unwanted results.
You must take into consideration platform-related differences in the fields returned for a KeyOnly retrieval when planning to port an Agile Business Suite application to a different host platform.
Flag command with KeyOnly
On MCP-based systems a Flag command to an Ispec or Event updates the record most recently retrieved, with or without KeyOnly.
Restrictions and Limitations
For all platforms
The KeyOnly command option is ignored with:
Extract files
Determine commands on Ispecs not using Profiles
Determine Total commands
LookUp of a Direct Component
LookUp Every Event or Memo Component
The Secure command option
For MCP-based systems
KeyOnly is ignored:
For Integrity Systems
For Ispecs with Integrity set
When CCSVersion is set
Example
In the following example, you want to validate a supplier name using the Component SUPP, with minimal database access. The key for the Component SUPP contains the Supplier name. Your current supplier name is stored in the attribute SUPPNAME, which has compatible edit characteristics.
DoWhen SUPPNAME NOT= Glb.Spaces LookUp SUPPNAME SUPP KeyOnly End