The CurrentField object is used in scripts that are attached to fields in the Integration Mapping window. This object refers to the destination field that the script is attached to.
Syntax
CurrentField.[property
| method]
Example
The following example
sets the current field to the value 19.95.
CurrentField.Value = 19.95
The FullName property returns a string containing the full name of a field.
Syntax
object.FullName
Parameters
object—A
current field object.
Comments
This name also contains
the names of any collections the current field may be part of.
Example
The following example
sets the CurrentField variable to the full name of the current
field.
SetVariable “CurrentField”, CurrentField.FullName
The Name property returns a string containing the name of a field.
Syntax
object.Name
Parameters
object—A
current field object.
Comments
This name does not
contain any information about a collection the current field may be
part of.
Example
The following example
sets the CurrentField variable to the name of the current
field.
SetVariable “CurrentField”, CurrentField.Name
The SetToDefault method specifies that a destination field will use its default value.
Syntax
object.SetToDefault
Parameters
None
Comments
You can use the
HasDefault property to verify that a destination field has a
non-empty default value before you use the SetToDefault
method.
Examples
The following example is
the Before Document Commit script for a customer integration. If
the CustomerType value from the Customer query is Preferred, the
Finance Charge Percent is set to 8. Otherwise, it is set to use the
field’s default.
If SourceFields(“CustomerType”) = “Preferred” Then DestinationFields(“Options.Finance Charge Percent”) = 8 Else DestinationFields(“Options.Finance Charge Percent”).SetToDefault End If