# RequiredProductionPartsByItemId: Fortnox Required Production Parts by Item ID Get the package items (Bill Of Materials, BOMs) for a production article If no parameters are supplied, the totalQuantityRequired for producing 1 unit is returned. Query parameter quantity can optionally be supplied, which will calculate totalQuantityRequired. If query parameter id is supplied, it will get the quantity from that Production Order (the quantity query parameter is ignored if id is included). ## Documentation <p> If no parameters are supplied, the <code>totalQuantityRequired</code> for producing 1 unit is returned. <p> Query parameter <code>quantity</code> can optionally be supplied, which will calculate <code>totalQuantityRequired</code>. <p> If query parameter <code>id</code> is supplied, it will get the quantity from that Production Order (the <code>quantity</code> query parameter is ignored if <code>id</code> is included). - Catalog: `Fortnox` - Schema: `WarehouseProductionOrders` - Label: Required Production Parts by Item ID This is a read-only table function. The Fortnox API may not support changing the data or the Invantive UniversalSQL driver for Fortnox does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Fortnox API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `RequiredProductionPartsByItemId`. 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 | |---|:---:|:---:|:---:|---| | `financialyear` | `` | ☐ | | Selects what financial year that should be used (does not work on every table). | | `financialyeardate` | `` | ☐ | | Selects by date, what financial year that should be used (does not work on every table). | | `fromdate` | `` | ☐ | | Defines a selection based on a start date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | | `id` | `` | ☐ | | the id of the production order (optional) | | `itemId` | `` | ☑ | | Production Article id | | `lastmodified` | `` | ☐ | | Retrieves all records since the provided timestamp (does not work on every table). | | `quantity` | `` | ☐ | | the quantity of the production order (assumed 1 if left empty) | | `todate` | `` | ☐ | | Defines a selection based on an end date. Only available for invoices, orders, offers, vouchers and supplierinvoices (does not work on every table). | ## Columns of Table Function The columns of the table function `RequiredProductionPartsByItemId` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `itemDescription` | `varchar2` | Item Description | ☐ | | | `itemId` | `varchar2` | Item ID | ☐ | | | `itemUnit` | `varchar2` | Item Unit | ☐ | | | `quantityRequired` | `decimal` | Quantity Required | ☐ | | | `quantityReserved` | `decimal` | Quantity Reserved | ☐ | | | `totalQuantityRequired` | `decimal` | Total Quantity Required | ☐ | |