<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=6889170&amp;fmt=gif">
Skip to content
  • There are no suggestions because the search field is empty.

Methods | IScriptContext.TryConvertFieldType Method

Attempts to convert the provided field to a new field type. A return value indicates whether the field was converted successfully to the new field type.

Syntax

C# Copy
bool TryConvertFieldType(
	FieldItem field,
        FieldItemType fieldType,
        bool logWarnings = false
)

Parameters
field    FieldItem
                The field to change and convert to a new field type.
fieldType    FieldItemType
                The new field type to convert values to.
logWarnings    Boolean (Optional)
                When true warnings will be logged when data cannot be converted.

Return Value
Boolean
true if conversion is successful; otherwise, false.

See Also

Reference
IScriptContext Interface
Compiled.EDD.Scripting Namespace