2.399 .value

This attribute queries or sets the current value of the object.

Definition

  • Data type

    string, object (text)

    data type of current content (variable)

  • Access

    get, set

  • changed event

    yes

    no (doccursor)

2.399.1 datetime

This attribute defines the value of the datetime object.

For write access (set), values of the data type string and text resources can be specified. text resources are automatically converted to string.

Read access (get) always returns a value of the data type string.

Value range

""
The current date or time is displayed.
<value_string>
Sets the contained date or time value.

Syntax and Evaluation of the Value String

The value is evaluated according to the “Definition of Time Spans” for the timer object, whereby the following absolute time definition is permitted:

<Value>     ::= {<Datevalue>}{ <TimeValue>}
<DateValue> ::= {<day>}.{<month>}.{<year>}
<TimeValue> ::= {<hour>}:{<minute>}{:{<second>}}

Deviating from the definition of time spans for the timer, it is permitted to specify only a date.

The datetime uses the Gregorian calendar. The value range extends from 01/01/1601 00:00:00 to 12/31/9999 23:59:59. Two-digit years are mapped to the time range 1970 to 2069.

When the user selects, sets or enters a value in the datetime, .value contains this value in full format dd.MM.yyyyy HH:mm:ss (see attribute .format). When a change occurs, a select event is triggered.

Parts not specified are completed in the display by the corresponding values of the current system date or the current system time. For example, for a missing year, the current year is inserted.

If the value string is syntactically incorrect, the current date or time is displayed (as with "").

Examples

The current date is 06/25/2014 and the current time is 11:53:07.

Value String

Displayed Value

12.1.

01/12/2014 11:53:07

Year and time are supplemented from the current values.

12.1

06/25/2014 11:53:07

Value string is syntactically incorrect. Current date and time are displayed.

If the value string is syntactically correct but does not represent a valid date or time (for example 29.2.2013 or 33.33.33), then it is undefined what is shown in the datetime. If the system returns an error, the current date or time is displayed. Otherwise, the system displays what it has made of the value string.

If .value ="" or is erroneous and the .allowundefined attribute has the value true, then the value is shown as indefinite (checkbox unchecked).

The additions and corrections made by the object for displaying the value do not change the attribute value. That is, .value keeps its set content until the user selects, sets or enters a value in the datetime.

The current date and time are calculated on visualization. In addition, they are calculated when in the visible state .value is set to a different value that the object adds or corrects for display (for example ""). Again, the attribute value is usually not adjusted to the shown value. Repeated setting of the same value (also of "") therefore does not represent a change in value, so in this case there is no update of the displayed value either.

2.399.2 doccursor (XML Cursor)

The attribute contains the value of the DOM node that the doccursor points to. It is only available if the .nodetype attribute has one of the following values:

Please note that an XML Cursor, whose attribute .mapped possesses the value false, will automatically be positioned to the root of the DOM Document.

2.399.3 filereq (File Dialogs)

This attribute, after a successful selection (return value of querybox() has been button_ok), contains the full path of the selected file or directory.

It should be noted that this path contains system-dependent delimiters.

If multiple selection is activated for the filereq object (.multisel = true), then the list of selected files is contained in the indexed attribute .value[integer].

In addition, the .value attribute defines the initially selected value in file and directory dialogs with .startsel = true.

See also

Attributes .multisel, .startsel, .value[integer]

2.399.4 Global Variables

Queries the current value of a global variable or assigns a new value to it.

For an assignment, the data type of the value or expression must correspond to the data type of the variable.