Retrieve the content of a given field, using a complex condition
This function returns the content of a field from a Table if a given value expression is satisfied.
Syntax:
GetValueSqlExp(<cFieldToReturn>, cTableToSearch>, <cExpression>)
Parameters |
Description |
cFieldToReturn |
Specifies the Field whose content is to be returned. |
cTableToSearch |
Specifies the table in which the value cFieldToReturn is located. |
cExpression |
Specifies the expression criteria. Expression criteria must be enclosed in [brackets]. |
Remark:
This function is similar to GetValueSQL. The main difference is that:
GetValueSQL search is based on only one condition. The content of a given field is based on the content of another field
GetValueSqlExp search is based on an expression that can contain multiple criteria.
Example:
*/ Show the document number for an invoice created for an address with ID = 1000 on the 01.03.2017 and whose reference is TEST_REFERENCE.
GetValueSQLExp("do_nodoc", "document", [do_type = 20 and do_adr1 = 1000 and do_date1 = {01.03.2017} and do_ref1 = "TEST_REFERENCE"])