rp_data::addfieldvalue

This method will add a value the a field property of the oData object. Before adding the value it will validate it's datatype. If incorrect it will return False and an error message placed in cErrorMsg (Public).

o.addfieldvalue( tcFieldName, tvFieldValue, tlChangeDataType)

Return Value

True or False

Parameters

tcFieldName
This is the field name to which the data is to be added. It will correspond to a property name in
o.oData

tvFieldValue
This is the value to insert

Remarks

ALWAYS USE THIS METHOD TO MODIFY OR ADD VALUES TO o.oData

This function is critical as it formats data and validates data types to there correct vales for the
field being updated. Hence it makes sure you don't put character values into numeric fields and
pads spaces to the begginning or end of string values if need be.

Example

o.AddFieldValue("Account","23233")

The above would
1.	Make sure the data type for the account field in oData is string
2.	Pad spaces to the value if required
3.	Place the value of "23233" into o.oData.Account

Any errors will be placed into o.cErrorMsg and o.lError will be true

If the field does not exist then you will also receive an error

See also:

Class rp_data


Last Updated: 23/11/2005