Click or drag to resize

IScriptContextGetOrCreateField Method (String, FieldItemType)

Gets or creates the field matching both the given name and field data type.

Namespace:  Compiled.EDD.Scripting
Assembly:  Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 7.6.1.3-5cb5c356
Syntax
C#
FieldItem GetOrCreateField(
	string fieldName,
	FieldItemType fieldType = FieldItemType.Text
)

Parameters

fieldName
Type: SystemString
The name of the field to create.
fieldType (Optional)
Type: Compiled.EDD.ScriptingFieldItemType
The data type of the field.

Return Value

Type: FieldItem
The existing field if the field exists and matches the field type; otherwise, the newly created field.
See Also