> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/acron-9.3/en/intro/funktionen/funk_datensatz.md).

# Record functions

The Record functions group contains functions that you use to retrieve information from the database. In the group you will find the following functions:

The first column of the table contains the name of the function as you enter it in an expression. The second column contains the data types of the argument(s), and the third column contains the data type of the function's return value.

| Function                         | Arguments                                                                              | Return value |
| -------------------------------- | -------------------------------------------------------------------------------------- | ------------ |
| [FloatAVG](#func_floatavg)       | (STRING, NUMBER, DATETIME)                                                             | NUMBER       |
| [FloatCalc](#func_floatcalc)     | (NUMBER, STRING, NUMBER, DATETIME, NUMBER)                                             | NUMBER       |
| [NullVal](#func_nullval)         | (NUMBER)                                                                               | NUMBER       |
| [RecDate](#func_recdate)         | ()                                                                                     | DATETIME     |
| [RecDateTime](#func_recdatetime) | ()                                                                                     | DATETIME     |
| [RecTime](#func_rectime)         | ()                                                                                     | DATETIME     |
| [RefTable](#func_reftable)       | (STRING, NUMBER)                                                                       | NUMBER       |
| [Stat](#func_stat)               | (NUMBER, STRING, NUMBER, DATETIME, NUMBER, STRING \[, STRING, STRING, STRING, STRING]) | NUMBER Stat  |

## FloatAVG function <a href="#func_floatavg" id="func_floatavg"></a>

|               |                                                                                                                                                                                                                                                        |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Syntax:       | NUMBER FloatAVG (STRING, NUMBER, DATETIME)                                                                                                                                                                                                             |
| Parameters:   | <ul><li>Identification of the process variable of which the data are used.</li><li>Number of time units \[1-900] (e.g. 90 for 90 days)</li><li>End date/time (usually: RecDate())</li></ul>                                                            |
| Return value: | Historical value.                                                                                                                                                                                                                                      |
| Description:  | <p>This function should only be used in exceptional circumstances, for performance reasons.</p><p>The data relating to a process variable from a past time are determined and, if there are multiple values, the arithmetic average is calculated.</p> |
| Example:      | <p>FloatAVG(„PV\_99", 10, RecDate())</p><p>If this function is called at the daily compression level, it returns the data from the last 10 days counting back from the calculated day of PV\_99 and from them forms the arithmetic average.</p>        |

## FloatCalc function <a href="#func_floatcalc" id="func_floatcalc"></a>

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | NUMBER FloatCalc (NUMBER, STRING, NUMBER, DATETIME, NUMBER)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Parameters:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | <ul><li><p>Base of data</p><pre><code>0    Process                 5    Interval 2    10    Interval 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 1    Interval1               6    Interval 3    11    Interval 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 2    Days from interval 1    7    Interval 4    1     Days from interval 2                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 3    Monthly data            8    Interval 5    13    Week                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 4    Year from month         9    Interval 6    14    Year from week                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| </code></pre></li><li>Identification of the process variable of which the data are used.</li><li><p>Number of time units referred to the base of data.</p><p>(Valid ranges: for process data \[1 - 90000], for all others \[1 - 900]).</p></li><li>End date/time (normally: RecDate() or RecDateTime()) the end of the time span resulting from the number of time units.</li><li><p>Compression method</p><p>(1 = Average, 2 = Sum, 3 = Minimum, 4 = Maximum) indicates how the base data (1st parameter) are compressed.</p></li></ul> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Return value:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | NUMBER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| Description:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | <p>This function should only be used in exceptional circumstances, for performance reasons.</p><p>The data relating to a process variable from a past time are determined and, if there are multiple values, they are compressed as per parameter 5.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| Example:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | <p>FloatCalc(2, "PV\_99", 10, RecDateTime(), 2)</p><p>The daily value of the calculation variable is the sum of the daily values of the process variable 'PV\_99' of the last 10 days referred to the current time:</p><p>on 7/10/2014 Sum of the (daily) values of PV\_99 from 7/1/2014 - 7/10/2014.</p><p>on 7/11/2014 Sum of the (daily) values of PV\_99 from 7/2/2014 - 7/11/2014.</p><p>on 7/12/2014 Sum of the (daily) values of PV\_99 from 7/3/2014 - 7/12/2014.</p><p>Comment on the third parameter:</p><p>Primary, secondary and additional interval 1 are enabled for the calculation variable. The intervals are 1h, 2h and 1 min. Value for the third parameter = 90.</p><p>This results in the following time spans for the interval concerned:</p><p>Primary interval = 90 h</p><p>Secondary interval = 180 h</p><p>Additional interval = 90 min</p> |

## NullVal function <a href="#func_nullval" id="func_nullval"></a>

|               |                                                                                                                                              |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | NUMBER NullVal (NUMBER)                                                                                                                      |
| Parameters:   | <ul><li>Value to be checked.</li></ul>                                                                                                       |
| Return value: | The value to be tested, or 0 if the tested value is invalid.                                                                                 |
| Description:  | <p>If the number is a valid value, the number is returned.</p><p>If the number is not a valid value, a 0 is returned instead of NOVALID.</p> |

## RecDate function <a href="#func_recdate" id="func_recdate"></a>

|               |                                                                                                                                                                                                                      |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | DATETIME RecDate ()                                                                                                                                                                                                  |
| Parameters:   | <ul><li>None</li></ul>                                                                                                                                                                                               |
| Return value: | Date of current calculation.                                                                                                                                                                                         |
| Description:  | Returns the date of the current calculation record in seconds since 1/1/1970 up to the start of the day (00:00 hours).                                                                                               |
| Example:      | <p>Only data relating to PV\_99 between 1st March and 5th October are to be recorded:</p><p>if (RecDate() >= DateYMD(Year(RecDate()), 3, 1) and RecDate() <= DateYMD(Year(RecDate()), 10, 5), PV\_99, NoValid())</p> |

## RecDateTime function <a href="#func_recdatetime" id="func_recdatetime"></a>

|               |                                                                                        |
| ------------- | -------------------------------------------------------------------------------------- |
| Syntax:       | DATETIME RecDateTime ()                                                                |
| Parameters:   | <ul><li>None</li></ul>                                                                 |
| Return value: | Date and time of current calculation.                                                  |
| Description:  | Returns the date and time of the current calculation record in seconds since 1/1/1970. |
| Example:      | See also: [RecDate()](#func_recdate) and [RecTime()](#func_rectime)                    |

## RecTime function <a href="#func_rectime" id="func_rectime"></a>

|               |                                                                                                                                                                                          |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | DATETIME RecTime ()                                                                                                                                                                      |
| Parameters:   | <ul><li>None</li></ul>                                                                                                                                                                   |
| Return value: | Time of current calculation.                                                                                                                                                             |
| Description:  | Returns the time (seconds since 00:00 hours) of the current calculation record.                                                                                                          |
| Example:      | <p>Only data relating to PV\_99 between 02:00 hours and 04:00 hours are to be recorded:</p><p>if (RecTime() >=TimeHMS(2, 0, 0) and RecTime() <= TimeHMS(4, 0, 0), PV\_99, NoValid())</p> |

## RefTable function <a href="#func_reftable" id="func_reftable"></a>

|               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | NUMBER RefTable (STRING, NUMBER)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Parameters:   | <ul><li>Name of file from plant path with reference entries.</li><li>Number for which the corresponding reference entry is to be searched for.</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Return value: | Found or interpolated value.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Description:  | <p>This function delivers a reference value from a data allocation table.</p><p>The processing is high-performance, and can also handle many thousands of entries.</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| Example:      | <p>RefTable ("Mirror\_content\_m3.csv",LEVEL)</p><p>In this example the content is determined based on a level reading from a reference table. This is sometimes only possible by means of a table, as the tank content (it is a reservoir) cannot be calculated.</p><p>Based on the process variable LEVEL, an entry is searched for in the file "Mirror\_content\_m3.csv". The file must be located in the plant path (plantidentification\Configuration\RefTable) and has the following structure:</p><p>BACKWATERLEVEL;CONTENT M3</p><p>300,5000;50,0000</p><p>300,6000;70,0000</p><p>300,7000;110,0000</p><p>300,8000;150,0000</p><p>300,9000;210,0000</p><p>301,0000;290,0000</p><p>301,1000;390,0000</p><p>301,2000;520,0000</p><p>301,3000;750,0000</p><p>301,4000;1240,0000</p><p>301,5000;2210,0000</p><p>301,6000;3590,0000</p><p>The first line of the file is ignored.</p><p>If the input value is between two table values, interpolation is applied. If in our example the level is 300.65, the average value between 70 and 110 = 90 will be the result.</p> |

## Function Stat <a href="#func_stat" id="func_stat"></a>

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   | NUMBER Stat(NUMBER, STRING, NUMBER, DATETIME, NUMBER , STRING \[, STRING, STRING, STRING, STRING])                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| Parameters:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | <ul><li><p>1. Base of data</p><pre><code>1    Interval1               6     Interval 3    11    Interval 8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 2    Days from interval 1    7     Interval 4    1     Days from interval 2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 3    Monthly data            8     Interval 5    13    Week                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 4    Year from month         9     Interval 6    14    Year from week                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 5    Interval 2              10    Interval 7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| </code></pre></li><li>2. Identification of the main process variable whose data is included in the calculation.</li><li><p>3. Number of time units referred to the base of data.</p><p>Valid ranges: \[1 - 900] or -1 for the entire calculation period of the current compression level. Where the calculation variable calculates an annual value, for example, then all data from 01/01 to 12/31 of the calculation year would be included if -1 is specified.</p></li><li><p>4. End time, for example RecDate() or RecDateTime()</p><p>The end of the time span resulting from the number of time units. If the value -1 was specified for the number of time units, then the end time results automatically, and this parameter is ignored.</p></li><li><p>5. Result of the statistical calculation</p><p>1- (multiple) correlation coefficient R - correlation coefficient</p><p>2- (multiple) coefficient of determination R² - coefficient of determination</p></li><li>6. Identification of the dependent process variable whose data is included in the calculation.</li><li>7.-10. Identifications of up to four additional process variables whose data is included in the calculation \[optional].</li></ul> |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Return value:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | NUMBER                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Description:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | <p>A statistical value is calculated from multiple process variables according to <a href="#ergebnis">parameter 5</a> (Result of statistical calculation). This function should be used with caution for performance reasons.</p><p>Background to the result values (source: Wikipedia)</p><p>Correlation coefficient r</p><p>The correlation coefficient, also product-moment correlation, is a measure of the degree of linear relationship between two at least interval-scaled characteristics that does not depend on the units of measurement and is therefore dimensionless.</p><p>It can assume values between -1 and +1. With a value of +1 (or -1), there is an entirely positive (or negative) linear relationship between the characteristics under analysis. If the correlation coefficient has the value 0, the two characteristics have no mutual linear dependence at all. They may, however, be mutually dependent in a non-linear way regardless of this. Thus, the correlation coefficient is not a suitable measure for the (pure) stochastic dependence of characteristics.</p><p>When the linear correlation of a characteristic to more than one other characteristic is considered, it is termed a multiple correlation coefficient R.</p><p>Since the correlation coefficient was popularized by Auguste Bravais and Pearson, it is also called Pearson correlation, or Bravais-Pearson correlation.</p><p>Coefficient of determination r²</p><p>In statistics, the coefficient of determination, denoted R2, is a measure for evaluating the goodness-of-fit of a regression - for example, to assess how well measured values fit a model. The coefficient of determination is based on the sum of squares decomposition, in which the total sum of squares is decomposed into the explained sum of squares (by the regression model) and the residual sum of squares.</p><p>In simple and multiple linear regression, the coefficient of determination is defined as "the proportion of the sum of squares explained by the regression to the total sum of squares to be explained", and indicates how much scatter in the data can be "explained" by a given linear regression model. In simple linear regression and multiple linear regression, the coefficient of determination is exactly equal to the square of the Bravais-Pearson correlation coefficient.</p><p>When the linear correlation of a characteristic to more than one other characteristic is considered, it is termed a multiple coefficient of determination R².</p> |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/acron-9.3/en/intro/funktionen/funk_datensatz.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
