GetValue
This method returns the content of a field from a Table if a given value exists in a specified field.
BODY - RAW
{
"Method": "GetValue",
"Parameters": [
<vValueToSearch>,
<cFieldToSearch>,
<cFieldToReturn>,
cTableToSearch>
]
}
Parameter | Description |
---|---|
vValueToSearch | Specifies the value to be searched for. |
cFieldToSearch | Specifies the Field in which the value vValueToSearch has to be searched for. |
cFieldToReturn | Specifies the field whose content has to be returned. |
cTableToSearch | Specifies the table in which both the fields cFieldToSearch and cFieldToReturn are located. |
REMARKS
The syntax of this method is the same as GetValueSQL.
The difference between these two methods consists in:
GetValue() is slightly faster than GetValueSQL() if cFieldToSearch and cFieldToReturn are both covered by indexes.
After using GetValue() the pointer will be on the record in which the result is found. If you are, as an example, performing a Table Scan on the same table from a script, the use of GetValue will move the pointer. This will break the continuity of the scan.
GetValueSQL() is faster than GetValue() if cFieldToSearch and cFieldToReturn are not both covered by indexes.
After using GetValueSQL() the pointer will not move from the record where it was located before using the method. If you are, as an example, performing a Table Scan on the same table from a script, the use of GetValueSQL will not move the pointer and will not break the continuity of the scan.
EXAMPLE
*/ Return the 1st address line for an address whose Company Name is "Company Name".
{
"Method": "GetValue",
"Parameters": [
"Company Name",
"ad_societe",
"ad_rue_1",
"adresses"
]
}