ListFieldCurrency.ConvertToField Method

SharePoint Designer Developer Reference

Changes a field from one type to another and returns an object of the type specified in the Type parameter.

Syntax

expression.ConvertToField(Type)

expression   Required. A variable that represents a ListFieldCurrency object.

Parameters

Name Required/Optional Data Type Description
Type Required FieldType Specifies the type of field to which to convert the specified field.

Remarks

The following chart specifies whether one field type can be converted to another field type and how the conversion works if special conversion is necessary.

From Field/ ToField Text Choice Note Note (Rich Text Enabled) Number Currency DateTime Boolean Multi-valued choice
Text N/A Yes Yes Yes Yes; converts numbers and sets other values to NULL Yes; converts numbers and sets other values to NULL Yes; converts dates and sets other values to NULL No Yes
Choice Yes N/A Yes Yes Yes; converts numbers and sets other values to NULL Yes; converts numbers and sets other values to NULL Yes; converts dates and sets other values to NULL No Yes
Note Yes; converts and truncates text to less than 255 characters. Yes; converts and truncates text to 255 characters. N/A Yes Yes; converts numbers and sets other values to NULL Yes; converts numbers and sets other values to NULL Yes; converts dates and sets other values to NULL No Yes; converts numbers and sets other values to NULL
Note (Rich Text Enabled) No No Yes N/A No No No No No
Number Yes Yes Yes Yes N/A Yes No Yes;converts zero and less to False and greater than zero to True. Yes
Currency Yes Yes Yes Yes Yes N/A No Yes; converts zero and less to False and greater than zero to True. Yes
DateTime Yes Yes Yes Yes No No N/A No Yes
Boolean Yes; converts to 0 or 1. Yes; converts to 0 or 1. Yes; converts to 0 or 1. Yes; converts to 0 or 1. Yes; converts to 0 or 1. Yes; converts to 0 or 1. No N/A Yes; converts to 0 or 1.
Multi-value choice Yes Yes Yes Yes Yes Yes Yes No N/A

See Also