# SalesForecastsEx: Exact Online Sales Forecasts
## Documentation:
Additional where-clause columns supported:chr(13) || chr(10) || chr(13) || chr(10)- division
- Catalog: `ExactOnlineXML`
- Schema: `XML`
- Label: Sales Forecasts
The data in this table is partitioned per value of the `Division` column.
- Retrieve: True
- Insert: True
- Update: True
- Delete: False
- Filters on API Server: division
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `SalesForecastsEx`. A value must be provided at all times for required parameters, but optional parameters in general do not need to have a value and the execution will default to a pre-defined behaviour. Values can be specified by position and by name. In both cases, all parameters not specified will be evaluated using their default values.
Value specification by position is done by listing all values from the first to the last needed value. For example: a `select * from table(value1, value2, value3)` on a table with four parameters will use the default value for the fourth parameter and the specified values for the first three.
Value specification by name is done by listing all values that require a value. For example with `select * from table(name1 => value1, name3 => value3)` on the same table will use the default values for the second and fourth parameters and the specified values for the first and third.
| Name | Data Type | Required | Default Value | Documentation |
|---|:---:|:---:|:---:|---|
| `division` | `int32` | ☐ | | Company code. |
| `Params_ForecastPeriod_From` | `int32` | ☐ | | Forecast period (from) |
| `Params_ForecastPeriod_To` | `int32` | ☐ | | Forecast period (through) |
| `Params_Item` | `varchar2` | ☐ | | Item code. |
| `Params_ItemGroup` | `varchar2` | ☐ | | Item group code. |
| `Params_SalesForecast` | `varchar2` | ☑ | | Sales forecast GUID (enclose in '{' and '}'). Determine possible values by inspecting the URL generated during export through Exact Online web frontend. |
## Columns of Table Function
The columns of the table function `SalesForecastsEx` are shown below. Each column has an SQL data type. A new non-null value must be provided for every required column at all times during insert and update.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `CODE_ATTR` | `varchar2` | Code | | |
| `DESCRIPTION_TERMID_ATTR` | `number` | Description Term ID | | |
| `DESCRIPTION` | `varchar2`(255) | Description | | |
| `DIVISION_CODE` | `varchar2` | Administration ID | ☑ | Internal unique number of the Exact Online administration. |
| `DIVISION_HID` | `int64` | Administration | ☑ | Number of the Exact Online administration. Not guaranteed to be unique. |
| `DIVISION_NAME` | `varchar2`(240) | Administration Name | ☑ | Name of the Exact Online administration. Not guaranteed to be unique. |
| `INTERFACE_URL` | `varchar2`(4000) | Interface URL | ☑ | URL used to interface this row with Exact Online. |
| `ISACTIVE_ATTR` | `varchar2` | Active | | 1=Active, 0=Inactive |
| `NOTES` | `varchar2` | Notes | | |
| `PERIODTYPE_ATTR` | `varchar2` | Period Type | | 2=Week, 3=Month |
| `ROWNUM` | `int64` | Row Number | ☑ | Number of the row within the results, starting at 1. |
| `SALESFORECASTITEMS` | `varchar2` | Sales Forecast Items | | |
| `WAREHOUSE_CODE_ATTR` | `varchar2` | Warehouse Code | | |
| `YEARPERIODFROM_PERIOD_ATTR` | `number` | From Period | | If periodType=2, min=1 max=52/53(if year has 53 weeks). If periodType=3, min=1 max=12 |
| `YEARPERIODFROM_YEAR_ATTR` | `number` | From Year | | The minimum year is the first financial year used for the financial periods. out of range=year lesser than the minimum year |
| `YEARPERIODTO_PERIOD_ATTR` | `number` | To Period | | If periodType=2, min=1 max=52/53(if year has 53 weeks). If periodType=3, min=1 max=12 |
| `YEARPERIODTO_YEAR_ATTR` | `number` | To Year | | The maximum year is 10 years from the current year. out of range=year greater than the maximum year |