Class ApplicationFlexibleField

Represents general/meta information about an application-level custom field, but does not represent its specific value.

See also

Class ApplicationFlexibleFieldValue for more information about custom field values.

class ApplicationFlexibleField()

Represents meta information about an application-level custom field including display name and help text among other information.

Arguments
  • json (object()) – Optional: The raw JSON object representation of the application-level custom field.

Constant Properties

ApplicationFlexibleField.INT

Represents the integer data type of a custom field.

ApplicationFlexibleField.STRING

Represents the string data type of a custom field.

ApplicationFlexibleField.DATETIME

Represents the date data type of a custom field.

ApplicationFlexibleField.DECIMAL

Represents the decimal data type of a custom field.

ApplicationFlexibleField.ENUM

Represents the enum data type of a custom field.

Methods

ApplicationFlexibleField.isTextField()

Return true if this custom field is a text field that represents a string value.

ApplicationFlexibleField.isDecimalField()

Return true if this custom field represents a decimal value.

ApplicationFlexibleField.isIntField()

Return true if this custom field represents an integer value.

ApplicationFlexibleField.isDateField()

Return true if this custom field represents a date value.

ApplicationFlexibleField.isDropDownField()

Return true if this custom field represents a value that can be chosen from a distinct set of available options.

ApplicationFlexibleField.hasHelpText()
Return true if this custom field has any help text associated with

it.

ApplicationFlexibleField.getValues()

Return a list of all allowed values for this custom field in case the field is presented as a drop-down field.

ApplicationFlexibleField.asIntValue(value)

Return the given value as an integer value or undefined if the field is not an integer field or the given value cannot be converted into an integer.

Arguments
  • value (object()) – A custom field value that will be represented as an integer value.

ApplicationFlexibleField.asStringValue(value)

Return the given value as a string value or undefined if the field is not a string-compatible field.

Arguments
  • value (object()) – A custom field value that will be represented as a string value.

ApplicationFlexibleField.asDateValue(value)

Return the given value as a date value or undefined if the field is not a date field or the given value cannot be converted into a date representation.

Arguments
  • value (object()) – A custom field value that will be represented as a date value.

ApplicationFlexibleField.asDecimalValue(value)

Return the given value as a decimal value or undefined if the field is not a decimal field or the given value cannot be converted into a decimal representation.

Arguments
  • value (object()) – A custom field value that will be represented as a decimal value.

ApplicationFlexibleField.isValid(user)

Return true, if this custom field is valid for the given user. Inactive or disabled fields are not valid. Further, some custom fields may only be visible to users of a certain branch.

Arguments
  • user (object()) – An instance of Class User that represents a user of the system for which it is verified that the user has access to this custom field.