Field.setDisplayValue

Sets a value for the form field using the appropriate display format for the field type and the language currently in use.

Throws an FormRuntimeException if the value is not appropriate for the field type.

Display formats can vary based on regional formatting associated with the language being used for the current form. Formatting is applicable for date, time and numeric fields. See Tools > System Preferences > Internationalization for details of the formatting applied for each language.

  • Boolean - value should be "true" or "false"
  • Character - any String value
  • Currency - any numeric String value, formatting commas/periods are supported
  • Date - should use an appropriate format for the current formatting language
  • Datetime - should use an appropriate format for the current formatting language
  • Integer - any numeric String value
  • Numeric - any numeric String value
  • Object - a serialized value for the Object
  • Time - using format hh:mm:ss.ttt
Javascript examples:
 fields.CHAR_FIELD.displayValue = "Test";
 fields.CHAR_FIELD.setDisplayValue("Test");
 fields.NUM_FIELD.displayValue = "1,234,000.456";
 fields.BOOL_FIELD.displayValue = "true";
 fields.DATE_FIELD.displayValue = "10/24/2012";
 fields.TIME_FIELD.displayValue = "09:30";
 fields.DATETIME_FIELD.displayValue = "10/24/2012 09:30";
 

Parameters

java.lang.String  value,