Navigation: ABC Library Reference > BrowseClass > BrowseClass Methods >====== AddField (specify a FILE/QUEUE field pair) ![]() | ![]() ![]() ![]() |
AddField( filefield, queuefield )
AddField | Identifies the corresponding FILE and QUEUE fields for a browse list column. |
filefield | The fully qualified label of the FILE field or memory variable. The filefield is the original source of the browse LIST's data. |
queuefield | The fully qualified label of the corresponding QUEUE field. The queuefield is loaded from the filefield, and is the immediate source of the browse LIST's data. |
The AddField method identifies the corresponding FILE and QUEUE fields for a browse list column. You must call AddField for each column displayed in the browse list.
You may also use the AddField method to pair memory variables with QUEUE fields by specifying a variable label as the filefield parameter.
Implementation: For browses with edit-in-place, you must add fields (call the AddField method) in the same sequence that you declare the browse QUEUE fields.
Example:
INCLUDE('ABBROWSE.INC') !declare browse & related classes
States FILE,DRIVER('TOPSPEED'),PRE(StFile) !declare States file
ByCode KEY(StFile:Code),NOCASE,OPT
Record RECORD,PRE()
Code STRING(2)
Name STRING(20)
END
END
StQType QUEUE,TYPE !declare the St QUEUE type
Code LIKE(StFile:Code)
Name LIKE(StFile:Name)
Position STRING(512)
END
BrowseStClass CLASS(BrowseClass),TYPE !declare the BrowseSt CLASS
Q &StQType
END
StQ StQType !declare the (real) StQ QUEUE
BrowseSt BrowseStClass !declare the BrowseSt object
CODE
BrowseSt.AddField(StFile:Code,BrowseSt.Q.Code) !pair up fields in
BrowseSt.AddField(StFile:Name,BrowseSt.Q.Name) !FILE & QUEUE