Don't get lost: IMan Guides » IMan User Guide » References » VBScript Functions » Field Functions

Field Functions

Field functions provide functionality to manipulate, get metadata and obtain the value of fields.

For each of the functions listed below the field argument is the field name and should be supplied in inverted commas e.g. “fieldname”.

GetParent

Description

Returns the value of a field from a parent record. The parent can be the immediate parent or any parent thereafter.

Syntax

  • GetParent( field, transaction )

Arguments

  • field
    • The field name to return the value of.
  • transaction
    • The transaction id of the field being referenced.

GetValue

Description

Obtains the value of a field of the current record. If the field has no value it will return the field’s default value (link) based on its type.

Remarks

The GetValue function is most useful in scenarios where a value needs to be obtained dynamically, and not with the %field type syntax.

Syntax

  • GetValue( field )

Arguments

  • field
    • The field name to return the value of.

Example

GetValue(“fieldName”)

IsFieldNull

Description

Tests whether a field is null or has a value set to it.

Syntax

  • IsFieldNull( field )

Arguments

  • field
    • The field name to test for null/no value.

NextRecord

Description

Returns the value of the field of the next record. If the current record is the last record, null is returned.

Syntax

  • NextRecord( field )

Arguments

  • field
    • The field name to return the value of.

PreviousRecord

Description

Returns the value of the field of the previous record. If the current record is the first record, null is returned.

Syntax

  • PreviousRecord( field )

Arguments

  • field
    • The field name to return the value of.

SetFieldNull

Description

Sets a field to null or no value.

Syntax

  • SetFieldNull( field )

Arguments

  • field
    • The field name to set to null/no value.

SubPushDown

Description

Copies or sets a field’s value from a parent record to its sibling records.

Syntax

  • SubPushDown( field, transaction, value )

Arguments

  • field
    • The field name in the sibling transaction to be set.
  • transaction
    • The transaction id of the field being referenced.
  • value
    • The value to set the field to.

Example

SubPushDown(“field”, “transaction”, %FieldInCurrentTran)