Function PropertyPrice2Display
Returns the property price and optionally status as a string for display.
PropertyPrice2Display([VALUE],[SOURCE],[DATASOURCE],[ADDSTATUS])
Parameters
# | Type | Passing | Default | Name | Description/Comments |
---|---|---|---|---|---|
1 | decimal | required | n/a | VALUE | The value to format (usually PRICEASK). Note also this value may be ignored and PRICEORIG or PRICEOFFER may be used depending on the status value from the property |
2 | integer | required | n/a | SOURCE | Source of data for pricing/status: 0 = From the table alias 1 = From the form object passed in the next parameter 2 = From a a table in the grid - the next parametrer is the Property Code |
3 | string or object | required | n/a | DATASOURCE | The data source either: When SOURCE = 0 is an alias like "PROPERTY" or alias() When SOURCE = 1 is a form object like Thisform When SOURCE = 2 is a the property code value |
4 | boolean | optional | .F. | ADDSTATUS | Add the property status to the price string, .T. = Display "For Sale @" and "To Rent @" etc |
Returns
The formatted value as a string
Examples
To output a string like "For Sale @ £1,000,000"
PropertyPrice2Display(PRICEASK,0,"PROPERTY",.T.)
To output a string like "£1,000 pm"
PropertyPrice2Display(PRICEASK,0,"PROPERTY",.F.)