keisuke-miyako/text-commands-2026-0418
062
1{2 "text": "The **OBJECT GET MINIMUM VALUE** command in 4D version 21 is a runtime operation designed to retrieve the minimum value property of a specified interface object, such as a form object, field, or variable, and return it in a designated output variable. Before invoking this command, several preconditions must be strictly satisfied to ensure correct execution. The command is exclusively applicable within the context of a running 4D application that has an active user interface, as it operates on objects defined in forms or on form-related variables and fields; it cannot be used in contexts devoid of a graphical interface, such as server-side processes, worker processes, or headless execution environments. The object referenced by the *object* parameter must exist in the current form context at the time of execution, meaning it must be a valid, instantiated object accessible through the form’s object hierarchy, and it must possess a defined minimum value property, either set via the Property List in Design mode or programmatically using the **OBJECT SET MINIMUM VALUE** command. The *minValue* parameter must be a variable of a compatible data type—specifically, it must be a Date, Time, or Number variable—capable of receiving the minimum value; passing a variable of an incompatible type, such as a Boolean, String, or Object, will result in undefined behavior or runtime errors. The execution context must be the main process or a foreground process, as the command is explicitly marked as not thread-safe and will fail or produce unpredictable results if called from a preemptive thread or a background worker. The *object* parameter’s interpretation is contingent upon the presence of the optional * operator: when the * operator is included, *object* must be a string literal or variable containing the exact name of a form object as defined in the form’s object hierarchy; when the * operator is omitted, *object* must be a direct reference to a field or variable object, such as a form variable or a table field, and not a string. The command does not support wildcards or partial matches; the *object* parameter must precisely identify a single object or a direct field/variable reference. On macOS and Windows platforms, the command behaves identically, with no platform-specific constraints or variations in functionality. The command is intended for use in both single-user desktop applications and client-server configurations, provided the execution occurs on the client side within a form context; it is not applicable in server-side methods or stored procedures that do not interact with the user interface. The command does not validate whether the object’s current value is below the minimum value at the time of retrieval; it solely returns the stored minimum value property, regardless of the object’s actual content or state. If the specified object does not have a minimum value property defined, the command returns a default value appropriate to the data type of *minValue*—zero for numeric types, the epoch date for Date types, and midnight for Time types—without generating an error or warning. The command does nothing and fails silently if the *object* parameter refers to a non-existent object or a field/variable that is not currently accessible in the form context, leaving the *minValue* variable unchanged. If the *minValue* variable is not declared or is of an incompatible type, the command may produce a runtime error, though the classic 4D error handling mechanism—using **ON ERR CALL**, **ERROR**, or **OK**—is not directly applicable to this command, as it does not raise explicit errors for invalid object references or type mismatches; instead, such conditions result in silent failure or undefined behavior. Upon successful execution, the command modifies the *minValue* variable by assigning it the current minimum value of the specified object, leaving all other system or application state unchanged. The system remains in a stable state after command completion, with no side effects on the object’s properties, form layout, or data integrity. There are no version-specific behavioral changes in 4D version 21 for this command; its functionality remains consistent with its introduction in version 14, with no deprecated features or altered semantics."3}