|
DSC Tech Library
WebAPI Web Access To Telemation
Field Lists
Some of the WebApi routines take as an argument “FieldList”, which is a character array describing which fields the client is interesting in returning/changing. This allows the programmer to limit the volume of network transmissions to only the data in which he is interested, rather than entire records every time. FieldLists consist of a string of comma-delimited field names, in the format: ,,…, e.g. “SRFNAM,SRCAMP".
When a record set is retrieved (WebApiReturnRecords() – note plural “Records”), the client application provides a list of the fields which will be returned in the data set, referred to by reference number. At that point, they are the only fields from the file which are available to the programmer, unless and until another request is made.
These record sets are stored in client memory, and calls to point to individual records made with iterative calls to WebApiReturnRecord() (note singular “Record”). This routine also requires a field list, which must be a subset of the field list provided to WebApiReturnRecords(). Fields are returned in the exact order of the provided field list (regardless of their order in the stored reference set), and are concatenated, thus allowing highly customized retrieval on a routine-by-routine basis.
When changing records (WebApiChangeRecord()/WebApiChangeRecno()), the user may create a custom change buffer using any valid (and supported – see Data Types) File Definition field names (regardless of those named and returned by the data retrieval routines), and only those areas of the data record will be modified.
|