Constants

This topic gives information about constants used in the JavaScript methods for eForms.

Constants

ConstantDescription

deviceType

Function:
The device types on which a form can load.
Common Usage:
Compare the device type returned from the getCurrentDeviceType method.
Syntax:
eFormHelper.constants.deviceType
Allowed Values:
An object that comes from AgilePoint NX with these values:
  • PC - A desktop or laptop machine.
  • Phone - A mobile phone device.
  • Tab - A tablet device.
Output
{Tab: 'ipad', PC: 'pc', Phone: 'iphone'}
  PC: "pc"
  Phone: "iphone"
  Tab: "ipad"
  [[Prototype]]: Object
Limitations:
  • AgilePoint NX v6.0 SP1​, Software Update 2, Hotfix 4 and higher.

fieldProperty

Function:
A list of behavior-related properties for a form control.
Common Usage:
Change the property for a form control in the updateFieldProperty method.
Syntax:
eFormHelper.constants.fieldProperty
Allowed Values:
An object that comes from AgilePoint NX with these values:
  • Mandatory - Specifies whether the field is mandatory.
  • Enabled - Specifies whether the runtime app user can change the value of a field.
  • Visible - Specifies whether the runtime app user sees the field.
Output
{Mandatory: 'Required', Visible: 'Visible', Enabled: 'Enabled'}
  Enabled: "Enabled"
  Mandatory: "Required"
  Visible: "Visible"
  [[Prototype]]: Object
Limitations:
  • AgilePoint NX v6.0 SP1​ and higher.

formLocale

Function:
The locale of the device where the form is loaded.
Syntax:
eFormHelper.constants.formLocale
Allowed Values:
Returns a text string that represents the locale.
Output
'en-US'
Limitations:
  • AgilePoint NX v7.0, Software Update 2, Cumulative Update 6 and higher.

isReportViewForm

Function:
Specifies whether the form loaded is in eForm report view.
Syntax:
eFormHelper.constants.isReportViewForm
Allowed Values:
Returns a Boolean value that represents whether the form loaded is an eForm report view.
  • true - The form loaded is an eForm report view.
  • false - The form loaded is not an eForm report view.
Output
false
Limitations:
  • AgilePoint NX v8.0 and higher.

lookuptype

Function:
The types of lookup.
Common Usage:
Specify a lookup type in the executeLookup method.
Syntax:
eFormHelper.constants.lookuptype
Allowed Values:
An object that comes from AgilePoint NX with these values:
  • user\\lookupnamevalue - The lookup retrieves data for specified name/value pairs.

    This lookup type also applies to the Single Select Lookup form control.

  • user\\lookupmulticolumn - The lookup retrieves data for more than one column.
Output
{multicolumn: 'user\\lookupmulticolumn', namevalue: 'user\\lookupnamevalue'}
  multicolumn: "user\\lookupmulticolumn"
  namevalue: "user\\lookupnamevalue"
  [[Prototype]]: Object
Limitations:
  • AgilePoint NX v6.0 SP1​ and higher.

messagetype

Function:
The types of messages.
Common Usage:
Specify a message type in the showDailogMessage method.
Syntax:
eFormHelper.constants.messagetype
Allowed Values:
An object that comes from AgilePoint NX with these values:
  • ERR - An error message.
  • WARN - A warning message.
  • INFO - An information message.
Output
{Warning: 'WARN', Error: 'ERR', Info: 'INFO'}
  Error: "ERR"
  Info: "INFO"
  Warning: "WARN"
  [[Prototype]]: Object
Limitations:
  • AgilePoint NX v6.0 SP1​ and higher.

printType

Function:
The print types for an eForm.
Common Usage:
Specify a print type in the onBeforePrint event.
Syntax:
printConstants.printType
Allowed Values:
An object that comes from AgilePoint NX with these values:
  • Native Print - Prints an eForm the way it shows in your web browser. This is sometimes referred to as WYSIWYG print.
  • Default Print - Prints an eForm with the print settings for the web browser.
Output
{defaultPrint: 'Default Print', nativePrint: 'Native Print'}
  defaultPrint: "Default Print"
  nativePrint: "Native Print"
  [[Prototype]]: Object
Limitations:
  • AgilePoint NX v8.0 Software Update 2 and higher.

renderMode

Function:
The mode in which the form loads.
Syntax:
eFormHelper.constants.renderMode
Allowed Values:
One of these text strings:
  • preview - The form loads in preview mode at design time.
  • runtime - The form loads in an app at runtime.
Output
'preview'
'runtime'
Limitations:
  • AgilePoint NX v6.0 SP1​ Software Update 1 and higher.

userProfileLocale

Function:
The locale for the runtime app user's profile in AgilePointNX Portal.
Syntax:
eFormHelper.constants.userProfileLocale
Allowed Values:
Returns a text string that represents the locale.
Output
'en-US'
Limitations:
  • AgilePoint NX v7.0, Software Update 2, Cumulative Update 6 and higher.