IScriptContextTryGetOrCreateField(String, ChoiceFieldItemType, FieldItem) Method |  |
Gets or creates the field matching both the given name and choice type. A return value indicates
an existing field with type was found or a new field instance was created successfully.
Namespace: Compiled.EDD.ScriptingAssembly: Compiled.EDD.Scripting (in Compiled.EDD.Scripting.dll) Version: 9.0.0.0-142fa9725
Syntaxbool TryGetOrCreateField(
string fieldName,
ChoiceFieldItemType choiceFieldItemType,
out FieldItem outputField
)
Parameters
- fieldName String
- The name of the field.
- choiceFieldItemType ChoiceFieldItemType
- The choice type of the field.
- outputField FieldItem
- When this method returns, contains the result of an existing or created field.
Return Value
Booleanfalse if a field exists and type does not match
true otherwise.
Exceptions| Exception | Condition |
|---|
| Exception | Thrown when a matching field name exists but the choice type does not match the field type. |
See Also