> For the complete documentation index, see [llms.txt](https://helpcenter.channable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-nl/regels-bulkbewerken-en-verrijken/how-to-use-actions-then-in-rules/berekenacties/rule-action-calculate-sum.md).

# Bereken som van waarden

Bereken het totaal van Getalwaarden die zijn opgeslagen in een veld van het type Lijst.

gebruik **`bereken som`** om alle numerieke waarden in een Veld van het type Lijst bij elkaar op te tellen.

Deze actie is handig voor taken zoals:

* Bereken de totale voorraad over alle productmaten.
* Bereken een totaal vanuit meerdere numerieke waarden.

***

## Voorbeeld `bereken som` gebruikssituaties

### bereken de totale voorraad over alle maten

gebruik deze Regel wanneer elk Item een waarde heeft in het `stock` veld. Gebruik eerst [Itemgroepen maken](https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-nl/regels-bulkbewerken-en-verrijken/how-to-use-actions-then-in-rules/itemacties/rule-action-build-item-group.md) Naar de `stock` waarden vanuit items met dezelfde `item_group_ID` in een nieuwe `stock_list` veld. Gebruik dan **`bereken som`** om de waarden toe te voegen in `stock_list` en sla het totaal op in `total_stock`.

#### Hoe je een Regel aanmaakt

* Voorwaarde: **`Voor alle Items`**
* Actie: DAN **`item groep samenstellen`** op basis van `item_group_ID` van `stock` en zet in `stock_list`
* Actie: DAN **`Bereken som`** van `stock_list` en zet in `total_stock`

{% hint style="info" icon="lightbulb" %}

#### Tip

Toevoegen **`item groep samenstellen`** ervoor **`bereken som`**. De `stock_list` het veld moet bestaan voordat je het totaal ervan kunt berekenen.
{% endhint %}

### Voorraadhoeveelheden van het magazijn toevoegen

Gebruik deze regel wanneer een lijstveld voorraadhoeveelheden vanuit meerdere magazijnen bevat.

#### Hoe je een Regel aanmaakt

* Voorwaarde: **`Voor alle Items`**
* Actie: DAN **`bereken som`** van `warehouse_stock_Lijst` en sla het resultaat op in `available_stock`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpcenter.channable.com/manage-improve-product-data/manage-product-and-improve-data-nl/regels-bulkbewerken-en-verrijken/how-to-use-actions-then-in-rules/berekenacties/rule-action-calculate-sum.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
