GOAL_GET ()
GOAL_GET (data_code, goal_type, [date = TODAY], [scope = ADMISSION])
Returns the last valid GOAL OBJECT in a date prior or equal to the specified date. If no scope is indicated, then ADMISSION is the default.
Input Parameters
Parameter | Type | Default | Description |
data_code | Number, String, Array | ||
goal_type | String | Type of GOAL OBJECT. Can be "MAX" or "MIN" (See GOAL OBJECT) | |
date | Date | "TODAY" | Expected format "YYYY-MM-DD". if time part is present, it will be ignored
|
scope | String | "ADMISSION" | null or a valid SCOPE (See GOAL OBJECT) |
Execution
Inmediately
Examples
GOAL_GET("WEIGHT", "MAX")
Returns the value of the last GOAL of type MAX (maximum) (no date was specified, so the function returns the last GOAL previous to TODAY)
, multiple selections available,