# StockChangeFromSupplyOrder Get stock change from supply order - Catalog: `Robaws` - Schema: `StockChanges` This is a read-only table function. The ROBAWS API may not support changing the data or the Invantive UniversalSQL driver for ROBAWS does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the ROBAWS API. ## Parameters of Table Function The following parameters can be used to control the behaviour of the table function `StockChangeFromSupplyOrder`. 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 | |---|:---:|:---:|:---:|---| | `supplyOrderId` | `` | ☑ | | | ## Columns of Table Function The columns of the table function `StockChangeFromSupplyOrder` are shown below. Each column has an SQL data type. | Name | Data Type | Label | Required | Documentation | |---|:---:|---|:---:|---| | `archivedAt` | `datetime` | Archived at | ☐ | | | `assignedEmployeeId` | `varchar2` | Assigned Employee ID | ☐ | | | `assignedSupplierId` | `varchar2` | Assigned Supplier ID | ☐ | | | `assignedUserId` | `varchar2` | Assigned User ID | ☐ | | | `bookedAt` | `datetime` | Booked at | ☐ | The exact moment the stock change was booked, with the time of day (bookingDate holds only the date). Empty while the stock change is not booked. It is set while the booking is processed, before the booking is saved and the stock is revalued, so a booking only becomes visible some time after this moment; on a large stock that delay can be several minutes or more. Use it to order bookings within one day. To fetch changes incrementally, let each window overlap the previous one generously and skip ids you already have. | | `booked` | `char` | Booked | ☐ | | | `bookingDate` | `datetime` | | ☐ | | | `createdAt` | `datetime` | Created at | ☐ | | | `date` | `datetime` | Date | ☐ | | | `deletedAt` | `datetime` | Deleted at | ☐ | | | `deliveryNoteId` | `varchar2` | | ☐ | | | `description` | `varchar2` | Description | ☐ | | | `enumeration` | `char` | Enumeration | ☐ | | | `extraFields` | `varchar2` | Extra Fields | ☐ | The JSON text of the nested object. | | `fromLocationId` | `varchar2` | From Location ID | ☐ | | | `id` | `varchar2` | ID | ☐ | | | `lockedAt` | `datetime` | Locked at | ☐ | | | `logicId` | `varchar2` | Logical ID | ☐ | | | `salesOrderId` | `varchar2` | Sales Order ID | ☐ | | | `status` | `varchar2` | Status | ☐ | | | `supplyOrderId` | `varchar2` | Supply Order ID | ☐ | | | `supplyOrder_archivedAt` | `datetime` | | ☐ | | | `supplyOrder_assignedUserId` | `varchar2` | | ☐ | | | `supplyOrder_companyId` | `varchar2` | | ☐ | | | `supplyOrder_completed` | `char` | | ☐ | | | `supplyOrder_completionPercentage` | `decimal` | | ☐ | | | `supplyOrder_createdAt` | `datetime` | | ☐ | | | `supplyOrder_deletedAt` | `datetime` | | ☐ | | | `supplyOrder_extraFields` | `varchar2` | | ☐ | The JSON text of the nested object. | | `supplyOrder_footerText` | `varchar2` | | ☐ | When reading, only present if requested via 'include' query parameter, otherwise null. HTML content. Embedded images are resolved to URLs based on the 'x-robaws-html-image-mode' request header: TEMPORARY_URL (default) returns time-limited presigned URLs that require no authentication; PERMANENT_URL returns stable URLs that require an authenticated session; NONE returns the stored HTML, where each image is an <img> with a data-robaws-id and an empty src — keep that tag and its data-robaws-id when writing the HTML back, or the image is lost. Any other value (e.g. BASE64_INLINE) returns 400 Bad Request. When writing, omit it or send null to keep the current text; send an empty string to clear it. | | `supplyOrder_id` | `varchar2` | | ☐ | | | `supplyOrder_introText` | `varchar2` | | ☐ | When reading, only present if requested via 'include' query parameter, otherwise null. HTML content. Embedded images are resolved to URLs based on the 'x-robaws-html-image-mode' request header: TEMPORARY_URL (default) returns time-limited presigned URLs that require no authentication; PERMANENT_URL returns stable URLs that require an authenticated session; NONE returns the stored HTML, where each image is an <img> with a data-robaws-id and an empty src — keep that tag and its data-robaws-id when writing the HTML back, or the image is lost. Any other value (e.g. BASE64_INLINE) returns 400 Bad Request. When writing, omit it or send null to keep the current text; send an empty string to clear it. | | `supplyOrder_lockedAt` | `datetime` | | ☐ | | | `supplyOrder_logicId` | `varchar2` | | ☐ | | | `supplyOrder_reference` | `varchar2` | | ☐ | | | `supplyOrder_remark` | `varchar2` | | ☐ | | | `supplyOrder_statusDetails_color` | `varchar2` | | ☐ | | | `supplyOrder_statusDetails_name` | `varchar2` | | ☐ | | | `supplyOrder_status` | `varchar2` | | ☐ | | | `supplyOrder_totalExclVat` | `decimal` | | ☐ | | | `supplyOrder_totalInclVat` | `decimal` | | ☐ | | | `supplyOrder_type` | `varchar2` | | ☐ | | | `supplyOrder_updatedAt` | `datetime` | | ☐ | | | `toClientId` | `varchar2` | To Client ID | ☐ | | | `toLocationId` | `varchar2` | To Location ID | ☐ | | | `updatedAt` | `datetime` | Updated at | ☐ | | | `workOrderId` | `varchar2` | Work Order ID | ☐ | |