Get Record Functions
AfmWebServicesGetRecordForView and AfmWebServicesGetRecord
Syntax
(AfmWebServicesGetRecordForView strAssetType strViewName strDataSourceId restriction)
(AfmWebServicesGetRecord strAssetType restriction fieldList)
Comments
These functions query the current project for a single record. The AfmWebServiceGetRecord function uses the default view. The program uses dataSourceId for the specified asset type when querying for this record.
strAssetType is a table name in the database where the record will be retrieved from. (required)
strViewName is a view name for the specific asset type. (required)
strDataSourceId is a dataSourceId in the specified view name. (required)
restriction species the restriction to be applied when querying for this record. (required)
fieldList is an optional list of fields to retrieve for this record. If set as nil, only the primary key values will be returned in the record. (optional)
Examples
The following example returns a single room record
AfmWebServicesGetRecord
"rm"
(list
(list "rm.bl_id" "HQ")
(list "rm.fl_id" "17")
(list "rm.rm_id" "101")
)
(list "rm.bl_id" "rm.fl_id" "rm.rm_id" "rm.rm_type" "rm.prorate")
The following example returns a single room record that contains all the fields specified in a datasource.
(AfmWebServicesGetRecordForView
"rm"
"ab-ov-rm"
"ds_abOvRm_data"
(list (list "rm.bl_id" "HQ") (list "rm.fl_id" "17
)