SystemVariable.setValue

Sets a value for the system variable, when the system variable supports this. Most system variables are read only.

The object types that can be used for value vary according to the field type as shown in the table below. The field type for each system variable can be obtained with method #getType(). In most cases, the mapping between object types and field types is handled automatically. Date and time fields require special consideration, particularly when calculations are performed.

Field TypeSupported Object Types
Boolean Boolean: any value
String: true values are "true", "Y", "Yes", "1", false values are "false", "N", "No", "0"
Number: 1 is true, 0 is false
Character String: any value
Boolean: true becomes "Y", false becomes "N"
Number: any value
Integer
Number
Currency
String: any numeric value
Number: any value
Date Date: both Java Date (java.util.Date) and Javascript Date objects can be used
String: must be in the format specified in parameter Ufs.dateFormat in file UFSSetup.properties
Number: represents the number of milliseconds since 1st January 1970
Datetime Date: both Java Date (java.util.Date) and Javascript Date objects can be used
String: Date followed by a space then Time.
Date must be in the format specified in parameter Ufs.dateFormat in file UFSSetup.properties
Time is in the format hh:mm:ss.ttt
Number: represents the number of milliseconds since 1st January 1970
Time Date: both Java Date (java.util.Date) and Javascript Date objects can be used
String: must be in the format hh:mm:ss.ttt
Number: represents the number of milliseconds since 1st January 1970
Object Any object type can be used. Note that these objects become part of the form state and must therefore implement the Java Serializable interface.

Further documentation.

Parameters

java.lang.Object  value,