<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.GetOrCreateField(String, FieldItemType) Method

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

Syntax

C# Copy
FieldItem GetOrCreateField(
	string fieldName
        FieldItemType fieldType = FieldItemType.Text
)

Parameters
fieldName    String
               
The name of the field to create.
fieldType    
FieldItemType  (Optional)
                The data type of the field.

Return Value
FieldItem
The existing field if the field exists and matches the field type; otherwise, the newly created field.

See Also

Reference
IScriptContext Interface
GetOrCreateField Overload
Compiled.EDD.Scripting Namespace