Function PropertyPrice2Output

Returns the property price and optionally status and tenure as a string for display.

PropertyPrice2Output([VALUE],[SOURCE],[DATASOURCE],[ADDSTATUS],[ADDSTENURE])

Parameters

#TypePassingDefaultNameDescription/Comments
1decimalrequiredn/aVALUEThe 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
2integeroptional0SOURCESource of data for pricing/status:
0 = From the table alias
1 = From the form object passed in the next parameter
3string or objectoptionalalias()DATASOURCEThe data source either:
When SOURCE = 0 is an alias like "PROPERTY" or alias()
When SOURCE = 1 is a form object like Thisform
4booleanoptional.F.ADDSTATUSAdd the property status to the price string, .T. = Display "For Sale @" and "To Rent @" etc
5booleanoptional.F.ADDSTENUREAdd the property tenure to the end of the price string

Returns

The formatted value as a string


Examples

To output a string like "For Sale @ £1,000,000 Freehold"

PropertyPrice2Output(PRICEASK,0,"PROPERTY",.T.,.T.)

To output a string like "£1,000 pm"

PropertyPrice2Output(PRICEASK,0,"PROPERTY",.F.,.F.)