 |
ALPHA-VISION® Database Operations: GetField
|
GetField
SUMMARY
GetField - reads record fields from tables pushed onto the stack.
SYNTAX
GetField(
<recordnr, fieldname>);
ARGUMENTS
- recordnr (type:integer)
-
The record number (the first record got number 0).
- fieldname (type:string)
-
The data base field name.
DESCRIPTION
Stack
- Missing arguments are taken from the stack.(and removed from there).
- The table must be on the stack also.
- The result is pushed on top of the stack.
Effect
The
ExecSql-Job
pushes its result (table - e.g. on SELECT) onto the stack.
'GetField' reads single fields from that table.
EXAMPLES
//Stack before (2 Elements: Index and a table with 2 Records of 2 Fields each):
//1
//{
// {
// {"PROD_ID", "ABC1"},
// {"DESCR", "Product ABC, Version 1"}
// },
// {
// {"PROD_ID", "XYZ2"},
// {"DESCR", "Product XYZ, Version 2"}
// }
//}
GetField(, "DESCR");
//Stack nachher: 2 Elemente:
//"Product XYZ, Version 2"
//{
// {
// {"PROD_ID", "ABC1"},
// {"DESCR", "Product ABC, Version 1"}
// },
// {
// {"PROD_ID", "XYZ2"},
// {"DESCR", "Product XYZ, Version 2"}
// }
//}
Syntax Notation
- [aaa]
- aaa is optional (zero or one occurences)
- (aaa|bbb)
- aaa exclusive or bbb
- (aaa)*
- aaa may occur indefinitely often or may be omitted
- (aaa)+
- aaa may occur indefinitely often but at least once
- (aaa)m..n
- aaa may occur from m to n times