--- title: "Direct line items" slug: "base-get-line-items-resolver" updated: 2026-04-23T08:03:37Z published: 2026-04-23T08:03:37Z canonical: "docs.lobstersoftware.com/base-get-line-items-resolver" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Direct line items > [!NOTE] > **Value resolver – Abstract** > > **Purpose:** Returns a list of line items for a given [Line item type](/v1/docs/en/base-line-item-type) that are directly subordinate to the entity in the *input value*. > > > [!TIP] > > Tooltip > > > > - **Usage**: The value resolver expects an entity as *input value* that has a line item hierarchy or belongs to it as a line item. The return value is a list of all direct (sub) line items for the (pre)defined [Line item type](/v1/docs/en/base-line-item-type). This list can be searched e.g. with the [Rule list resolver](/v1/docs/en/core-list-rule-resolver) but also extended with the [List item](/v1/docs/en/core-list-item-resolver) value resolver. > > - **Parameter**: The only **Of type** parameter defines the relevant [Line item type](/v1/docs/en/base-line-item-type) when used at the header level (above the item hierarchy). In the context of a line item, the selection is omitted because the line item specifies the line item category. > > - **NOTE:** Since "manifest line items" have no type and hierarchy, the value resolver for [Manifests](/v1/docs/en/mfst-manifest) is not supported. | At header level: | Within the line item hierarchy: | | --- | --- | | ![images/download/attachments/78256004/image2022-7-26_12-48-19-version-1-modificationdate-1658832499718-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_12-48-19-version-1-modificationdate-1658832499718-api-v2.png) | ![images/download/attachments/78256004/image2022-7-26_12-49-20-version-1-modificationdate-1658832561052-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_12-49-20-version-1-modificationdate-1658832561052-api-v2.png) | The [Direct line items](/v1/docs/en/base-get-line-items-resolver) value resolver returns a list of line items for a specific [Line item type](/v1/docs/en/base-line-item-type) that are directly subordinate to the entity in the *input value*. - The value resolver not only allows access to existing items within the hierarchy, but is also useful for selectively adding new line items to the existing hierarchy in conjunction with the [List item](/v1/docs/en/core-list-item-resolver) value resolver. It is intended exclusively for the context of entities whose type definition supports a line item hierarchy. Within the business transaction objects, this affects [Orders](/v1/docs/en/ord-order), [Shipments](/v1/docs/en/shp-shipment) and the [Common business object](/v1/docs/en/orchestration-common-bto) type, but not [Manifests](/v1/docs/en/mfst-manifest), as these do not have a line item *hierarchy*, but contain only a single level of "manifest line items" (with the [Shipments](/v1/docs/en/shp-shipment) assigned to the manifest). The appearance of the value resolver differs depending on the level of the line item hierarchy at which it is used: - At the header level (see image above left) – if the *input value* specifies the parent entity of the line item hierarchy – the **Of type** parameter must be used to select the [Line item type](/v1/docs/en/base-line-item-type) for which the line items of the top hierarchy level are returned. - Within the line item hierarchy – if the *input value* specifies a particular hierarchical line item within the hierarchy – the [Line item type](/v1/docs/en/base-line-item-type) is already predetermined by the parent line item, so the parameter is omitted. ## Configuration When used at header level, the [Line item type](/v1/docs/en/base-line-item-type) must be selected. For read accesses to existing line items, the selection acts as a filter. The selection is even more important if new line items are to be added via the [List item](/v1/docs/en/core-list-item-resolver) value resolver. Because then the selection in the value resolver declares which line item type is added. | The selection field for the **Of type** parameter (to be read in conjunction with the name of the value resolver as [Direct line items](/v1/docs/en/base-get-line-items-resolver) **Of type**) refers to the dynamic enumeration [Line item type](/v1/docs/en/base-line-item-type) and supports a search function as shown on the right. [Enumeration filters](/v1/docs/en/core-dynamic-enum-filter) for the [Line item type](/v1/docs/en/base-line-item-type) that can be applied in the context of the configuration can restrict the selection options. Such restrictions have no influence on the runtime behavior. | ![images/download/attachments/78256004/image2022-7-26_12-50-22-version-1-modificationdate-1658832622454-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_12-50-22-version-1-modificationdate-1658832622454-api-v2.png) | | --- | --- | ## Examples ### Add an item of a specific line item category at the header level When creating a new order, a service line item with default data should be created automatically. Configuration: | The event handling shown on the right reacts to the **Triggering event** "New" (see [Common action event](/v1/docs/en/core-common-action-event)), i.e. it becomes active when the "New" button is pressed in a data input form. The ideal time to initialize the data of the new entity automatically. --- The **Validating rule** uses a [Check type](/v1/docs/en/core-check-type-rule) to ensure that the new entity is an order. The following actions are executed only if this is the case. --- As an **Action on passed rule** an [Execute with](/v1/docs/en/core-with-actor) event action is executed. The new service line item is defined as the *reference object* for the action block below via its **Object Resolver** parameter: - The [Direct line items](/v1/docs/en/base-get-line-items-resolver) value resolver defines the list of all direct service line items to which a new item is added by selecting "Service" for the **Of type** parameter. - The concatenated [List item](/v1/docs/en/core-list-item-resolver) value resolver adds the first service item by "Add first" **Mode**. In the action block, the new line item can be filled with default values as required. In the example, a [Set value](/v1/docs/en/core-set-value-actor) event action assigns a default value only to the "Goods description" text attribute. | ![images/download/attachments/78256004/image2022-7-26_12-53-6-version-1-modificationdate-1658832786178-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_12-53-6-version-1-modificationdate-1658832786178-api-v2.png) | | --- | --- | ### Check for "sub-items" with certain properties A [Client Workflow](/v1/docs/en/frebehav-client-workflow) determines in the context of an input form for [Shipments](/v1/docs/en/shp-shipment) whether sub-items exist for a line item displayed in the form which has set the indicator attribute "Dangerous goods". Depending on the result of the search, an active (red) or inactive (light gray) warning icon appears in the context of the line item. Runtime example: ![images/download/attachments/78256004/image2022-7-26_12-58-2-version-1-modificationdate-1658833082568-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_12-58-2-version-1-modificationdate-1658833082568-api-v2.png) - The warning symbol for "Dangerous goods" only appears in the line item if the indicator attribute "Dangerous goods" is set for at least one (direct) sub-item of the line item. - The sub-items themselves are not displayed in the input form. Configuration: | The client workflow shown on the right is executed in the input form for [Shipments](/v1/docs/en/shp-shipment) when loading the data for each item line. Via a link to the [Element containers](/v1/docs/en/fre-element-container-vo) for the line item data the "Shipment line item" is provided as *input value*. - The **Validating rule** uses [Check type](/v1/docs/en/core-check-type-rule) to ensure that there is a "Shipment line item" in the *input value*. - As an **Action on passed rule**, an [If then else](/v1/docs/en/core-if-then-else-actor) event action is executed, which has exactly one objective: If the shipment line item in the *input value* does not have a sub-item with the "Dangerous goods" indicator, the client workflow is terminated by the [Abort](/v1/docs/en/core-abort-actor). Then the "Actions on false" are executed in the surrounding [Behaviors](/v1/docs/en/frebehaviours) (not in the image). Otherwise – i.e. if at least one "Dangerous goods" sub-item is found, the client workflow ends without aborting and the "Actions on true" are executed. The check is implemented as follows: - The outer [Entity property rule](/v1/docs/en/core-entity-property-rule) is fulfilled exactly when no "Dangerous goods" sub-items are found, because then the criterion [Is empty](/v1/docs/en/core-is-empty-matcher) for the return value from the [Rule list resolver](/v1/docs/en/core-list-rule-resolver) applies. - The [Direct line items](/v1/docs/en/base-get-line-items-resolver) value resolver returns all direct sub-items of the line item present as *input* *value* for the [Rule list resolver](/v1/docs/en/core-list-rule-resolver). - The [Rule list resolver](/v1/docs/en/core-list-rule-resolver) searches for a sub-item that has an indicator attribute of the type "Dangerous goods" with the value "true". The first match is returned, otherwise the return value is "no value" (`$null`). | ![images/download/attachments/78256004/image2022-7-26_13-2-8-version-1-modificationdate-1658833328898-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image2022-7-26_13-2-8-version-1-modificationdate-1658833328898-api-v2.png) | | --- | --- |