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

Gets or creates the field matching both the given name and field type. A return value indicates an existing field with type was found or a new field instance was created successfully.

Syntax

C# Copy
bool TryGetOrCreateField(
	string fieldName,
        FieldItemType  fieldType,
        out FieldItem outputField
)

Parameters
fieldName    String
                The name of the field.
fieldType    FieldItemType
                The data type of the field.
outputField    FieldItem
                When this method returns, contains the result of an existing or created field.

Return Value
Boolean
true if a field with the name and field type found, or created by this method; otherwise, false.

See Also

Reference
IScriptContext Interface
TryGetOrCreateField Overload
Compiled.EDD.Scripting Namespace