Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Objects

Type

Description

form

java.util.Map

Allows access to other fields value and work item value for title, description, status, type, assignee and tags

field

flexagon.fd.model2.pojo.common.FieldDataObject

Set current field value and override properties value for required, hidden, disabled, maxValue, minValue and precisionmaxLength.

currentUser

flexagon.fd.model2.pojo.common.CurrentUser

Returns CurrentUser object with methods - getUserId(), getUserName(), getFirstName(), getLastName(), getEmail() and getRoles()

FLEXDEPLOY

flexagon.fd.services.groovy.functions.IFlexDeployFunctions

Functions for performing actions in FlexDeploy.

EMAIL

flexagon.fd.services.groovy.functions.EmailFunctions

Functions for formatting and sending emails.

REST

flexagon.fd.services.groovy.functions.RestFunctions

Object exposing REST functions. For more info see Using the REST object.

TOPOLOGY

flexagon.fd.services.groovy.functions.TopologyFunctions

Allows access to Integration Accounts(such as Source Control, Change Management, Cloud, or other tools) properties.

...

Variables

Type

Description

field.name

java.lang.String

Returns the current field name.

field.datatype

java.lang.String

Returns the current field data type.

field.value

java.io.Serializable

Updates the current field value

Code Block
languagegroovy
if (field.value == '' || field.value == null) {
   if (form.type.equalsIgnoreCase("Emergency")) {
      field.value = "Priority 1"
   }
   else {
     field.value = "Priority 2"
   }
 } 

field.state.required

java.lang.Boolean

Overrides the current field required property. True or False.

Code Block
languagegroovy
if (form.DOWN_TIME_REQUIRED!= null &&  form.DOWN_TIME_REQUIRED== true) {
    field.state.required= true;
} 

field.state.disabled

java.lang.Boolean

Overrides the current field disabled property. True or False.

Code Block
languagegroovy
if (field.value != '' && field.value != null) {
    field.state.disabled= true;
}

field.state.hidden

java.lang.Boolean

Overrides the current field hidden property. True or False.

Code Block
languagegroovy
// Hide field based on other field value.
if (form.VENDOR_NOT_FOUND != null &&  form.VENDOR_NOT_FOUND == false) {
      field.state.hidden = true      
}  
 

field.state.maxValue

java.lang.Long

Overrides the current field maxValue property.

Code Block
languagegroovy
  field.state.maxValue = 10000

field.state.minValue

java.lang.Long

Overrides the current field minValue property.

Code Block
languagegroovy
  field.state.minValue= 100

field.state.precisionmaxLength

java.lang.Long

Overrides the current field precision(Max Length) maxLength property.

Code Block
languagegroovy
  field.state.precisionmaxLength= 255