# DepartmentBranchesByDepartmentId
Returns a single department based on the given ID.
Returns a single department based on the given ID.
- Catalog: `Bouw7`
- Schema: `Department`
This is a read-only table function. The Bouw7 API may not support changing the data or the Invantive UniversalSQL driver for Bouw7 does not cover it. In the latter case, please use the table NativePlatformScalarRequests to upload data to the Bouw7 API.
## Parameters of Table Function
The following parameters can be used to control the behaviour of the table function `DepartmentBranchesByDepartmentId`. 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 |
|---|:---:|:---:|:---:|---|
| `department` | `` | ☑ | | |
## Columns of Table Function
The columns of the table function `DepartmentBranchesByDepartmentId` are shown below. Each column has an SQL data type.
| Name | Data Type | Label | Required | Documentation |
|---|:---:|---|:---:|---|
| `branch_code` | `varchar2` | Branch Code | ☐ | The code for this branch |
| `branch_division_description` | `varchar2` | | ☐ | The description of the division. |
| `branch_division_exactDivisionId` | `varchar2` | | ☐ | The division ID of an Exact Online environment. |
| `branch_division_glAccountCode` | `varchar2` | | ☐ | A default general ledger account code to use for sales related items. |
| `branch_division_glAccountCodePurchase` | `varchar2` | | ☐ | A default general ledger account code to use for purchase related items. |
| `branch_division_id` | `int64` | | ☐ | The ID of the division. |
| `branch_division_journalCode` | `varchar2` | | ☐ | A default journal code to use for sales related items. |
| `branch_division_journalCodePurchase` | `varchar2` | | ☐ | A default journal code to use for purchase related items. |
| `branch_division_salesInvoiceNumberPrefix` | `varchar2`(3) | | ☐ | The prefix (3 digits) used to generate invoice number range per division. |
| `branch_id` | `int64` | Branch ID | ☐ | The ID of the branch. |
| `branch_name` | `varchar2` | Branch Name | ☐ | The name of this branch |
| `code` | `varchar2` | Code | ☐ | The code for this branch |
| `color` | `varchar2` | Colour | ☐ | Display color of the department |
| `createdAt` | `datetime` | Created at | ☐ | The creation time of the entity. |
| `createdBy` | `varchar2` | Created by | ☐ | The user that created the entity. |
| `division_description` | `varchar2` | Division Description | ☐ | The description of the division. |
| `division_exactDivisionId` | `varchar2` | Division Exact Division ID | ☐ | The division ID of an Exact Online environment. |
| `division_glAccountCode` | `varchar2` | Division General Ledger Account Code | ☐ | A default general ledger account code to use for sales related items. |
| `division_glAccountCodePurchase` | `varchar2` | Division General Ledger Account Code Purchase | ☐ | A default general ledger account code to use for purchase related items. |
| `division_id` | `int64` | Division ID | ☐ | The ID of the division. |
| `division_journalCode` | `varchar2` | Division Journal Code | ☐ | A default journal code to use for sales related items. |
| `division_journalCodePurchase` | `varchar2` | Division Journal Code Purchase | ☐ | A default journal code to use for purchase related items. |
| `division_salesInvoiceNumberPrefix` | `varchar2`(3) | Division Sales Invoice Number Prefix | ☐ | The prefix (3 digits) used to generate invoice number range per division. |
| `hasBranchSpecificAccess` | `char` | | ☐ | Whether users within the department can only access items associated with one of the specified branches. |
| `id_2` | `int64` | ID | ☐ | ID of the department. |
| `id` | `int64` | ID | ☐ | The ID of the branch. |
| `isActive` | `char` | Is Active | ☐ | Whether or not the department is active. |
| `isDataWithoutBranchAccessible` | `char` | | ☐ | Whether this branch can access data without a branch, this option is only used in combination with the hasBranchSpecificAccess=true. |
| `name_2` | `varchar2` | | ☐ | Name of the department. |
| `name` | `varchar2` | Name | ☐ | The name of this branch |
| `updatedAt` | `datetime` | Updated At | ☐ | The last updated time of the entity. |
| `updatedBy` | `varchar2` | Updated by | ☐ | The user that last updated the entity. |