# \#computation

**URL:** https://discourse.geta12.com/tag/computation/12.md

[Latest](https://discourse.geta12.com/latest.md) · [Categories](https://discourse.geta12.com/categories.md) · [Tags](https://discourse.geta12.com/tags.md)

---

## [A12 computation to collect / join list of fields](https://discourse.geta12.com/t/a12-computation-to-collect-join-list-of-fields/2887)

<div class="topic-metadata">

**Author:** [@julian-typed-spruce](https://discourse.geta12.com/u/julian-typed-spruce)\
**Replies:** 2\
**Last updated:** [July 25, 2025, 10:14am UTC](https://discourse.geta12.com/t/a12-computation-to-collect-join-list-of-fields/2887 "2025-07-25T10:14:41Z")

</div>

Hi, i would like to write a computation that collects / joins a list of fields together. e.g. { "data": { "mygroup": \[ { "aField": "value1" }, { "aField": "value2" }, { "aField": "valu…

---

## [Computation of a field only one time / if it has NULL value](https://discourse.geta12.com/t/computation-of-a-field-only-one-time-if-it-has-null-value/2654)

<div class="topic-metadata">

**Author:** [@tobias-gentle-alder](https://discourse.geta12.com/u/tobias-gentle-alder)\
**Replies:** 11\
**Last updated:** [June 3, 2025, 10:34am UTC](https://discourse.geta12.com/t/computation-of-a-field-only-one-time-if-it-has-null-value/2654 "2025-06-03T10:34:05Z")

</div>

I have a fairly trivial task: I want to set a date-field to TODAY but only once. Once set, the value should not change anymore. Since references to the field itself are not allowed in the precondition for whatever reason…

---

## [Docs for RoundAccounting() are incorrect (luckily)](https://discourse.geta12.com/t/docs-for-roundaccounting-are-incorrect-luckily/2279)

<div class="topic-metadata">

**Author:** [@stephen-warm-graph](https://discourse.geta12.com/u/stephen-warm-graph)\
**Replies:** 2\
**Last updated:** [July 11, 2024, 11:20am UTC](https://discourse.geta12.com/t/docs-for-roundaccounting-are-incorrect-luckily/2279 "2024-07-11T11:20:22Z")

</div>

The A12 documentation says (emphasis mine) RoundAccounting and RoundAccountingValue always round in the direction of the next number (when indicated, with decimal places). If both neighbors are equidistant, then the (f…

---

## [Computations after A12 update to 2023.06-ext3](https://discourse.geta12.com/t/computations-after-a12-update-to-2023-06-ext3/2002)

<div class="topic-metadata">

**Author:** [@lara-early-vale](https://discourse.geta12.com/u/lara-early-vale)\
**Replies:** 3\
**Last updated:** [February 8, 2024, 10:51am UTC](https://discourse.geta12.com/t/computations-after-a12-update-to-2023-06-ext3/2002 "2024-02-08T10:51:44Z")

</div>

Hey, we currently updated our project to the new A12 version 2023.06-ext3. And now we have some problems with some computations. They are sometimes failing strangely. So one example we have a computation that has a pre…

---

## [Compute a String with length=0 depending on a precondition](https://discourse.geta12.com/t/compute-a-string-with-length-0-depending-on-a-precondition/1316)

<div class="topic-metadata">

**Author:** [@ducdung-bright-shrub](https://discourse.geta12.com/u/ducdung-bright-shrub)\
**Replies:** 1\
**Last updated:** [March 13, 2023, 3:00pm UTC](https://discourse.geta12.com/t/compute-a-string-with-length-0-depending-on-a-precondition/1316 "2023-03-13T15:00:43Z")

</div>

Hello, I defined following coputation: What I try to model, is following: If the value “kostenlos” was selected inside the Multi-Select Kosten\*/value, then the A12-Field /xflb/kosten/kostenlos must habe a String of …

---

## [Computed value is missing in saved document model after a12 update](https://discourse.geta12.com/t/computed-value-is-missing-in-saved-document-model-after-a12-update/624)

<div class="topic-metadata">

**Author:** [@nick-linked-tensor](https://discourse.geta12.com/u/nick-linked-tensor)\
**Replies:** 3\
**Last updated:** [September 8, 2022, 6:20am UTC](https://discourse.geta12.com/t/computed-value-is-missing-in-saved-document-model-after-a12-update/624 "2022-09-08T06:20:14Z")

</div>

Hi, We use computations in the ModulF project to, for example, save a combined address in our document model (e.g. Musterstraße 21, 12345 Musterort). We recently updated to a12 version 2022.06 and after the update the c…

---

## [Does Approximate Match Search Work on Computed Fields?](https://discourse.geta12.com/t/does-approximate-match-search-work-on-computed-fields/619)

<div class="topic-metadata">

**Author:** [@karin-sparse-tundra](https://discourse.geta12.com/u/karin-sparse-tundra)\
**Replies:** 4\
**Last updated:** [September 1, 2022, 2:52pm UTC](https://discourse.geta12.com/t/does-approximate-match-search-work-on-computed-fields/619 "2022-09-01T14:52:18Z")

</div>

Hi! It seems like the Approximate Match Search does not work on Computed String Fields. Am I right in my assumption? Thanks in advance

---

## [Check if all boolean fields are TRUE](https://discourse.geta12.com/t/check-if-all-boolean-fields-are-true/441)

<div class="topic-metadata">

**Author:** [@tobias-amber-boulder](https://discourse.geta12.com/u/tobias-amber-boulder)\
**Replies:** 2\
**Last updated:** [July 19, 2022, 1:18pm UTC](https://discourse.geta12.com/t/check-if-all-boolean-fields-are-true/441 "2022-07-19T13:18:19Z")

</div>

Hi! I have a repeatable group in an A12 model with a boolean field in it. How can I check if all these fields are “true”? I’ve tried AtLeastOneFieldValueIncludedInValueList and simular functions, but these don’t work …

---

## [Is there a way to do "SUM-IF"-computations in Data Models?](https://discourse.geta12.com/t/is-there-a-way-to-do-sum-if-computations-in-data-models/165)

<div class="topic-metadata">

**Author:** [@christine-solid-alder](https://discourse.geta12.com/u/christine-solid-alder)\
**Replies:** 3\
**Last updated:** [July 19, 2022, 11:12am UTC](https://discourse.geta12.com/t/is-there-a-way-to-do-sum-if-computations-in-data-models/165 "2022-07-19T11:12:40Z")

</div>

Hey everybody, I have a question regarding computations in the data modeller. In our project, we have a data model that holds a repeated include. The repeated elements have (amongst others) two fields amount and type. …

---

## ["Error text for computation of \[Computation rule\]" when validating](https://discourse.geta12.com/t/error-text-for-computation-of-computation-rule-when-validating/555)

<div class="topic-metadata">

**Author:** [@malcolm-silver-ice](https://discourse.geta12.com/u/malcolm-silver-ice)\
**Replies:** 1\
**Last updated:** [July 15, 2022, 6:33am UTC](https://discourse.geta12.com/t/error-text-for-computation-of-computation-rule-when-validating/555 "2022-07-15T06:33:44Z")

</div>

Hi all, I have an error message when I validate my document which I don’t understand. I modelled a computation in the SME (2022.06 installer) and it was accepted without any error messages. The preconditions and calcula…

---

## [Calculating with "DifferenceInMonths"/"DifferenceInYears"](https://discourse.geta12.com/t/calculating-with-differenceinmonths-differenceinyears/496)

<div class="topic-metadata">

**Author:** [@sarah-wintry-tundra](https://discourse.geta12.com/u/sarah-wintry-tundra)\
**Replies:** 2\
**Last updated:** [May 4, 2022, 7:00am UTC](https://discourse.geta12.com/t/calculating-with-differenceinmonths-differenceinyears/496 "2022-05-04T07:00:39Z")

</div>

Hey, for my model i used the command “DifferenceInYears” and "DifferenceInMonths. the integer Number of this comand is shown in the field “YearFromDate” or “MonthFromDate”. After that i have to use that integer to compu…

---

## [Why does IDocumentRtService throw an exception if a computed field is not present in the document?](https://discourse.geta12.com/t/why-does-idocumentrtservice-throw-an-exception-if-a-computed-field-is-not-present-in-the-document/366)

<div class="topic-metadata">

**Author:** [@andreas-fresh-mesa](https://discourse.geta12.com/u/andreas-fresh-mesa)\
**Replies:** 0\
**Last updated:** [April 23, 2020, 1:45pm UTC](https://discourse.geta12.com/t/why-does-idocumentrtservice-throw-an-exception-if-a-computed-field-is-not-present-in-the-document/366 "2020-04-23T13:45:58Z")

</div>

While working with computations I came across a surprising behaviour of IDocumentRtService. For example if there is this document and a corresponding model: { "id": "123", "Root": { "Foo": null } } …

---

## [How to add missing fields to a document?](https://discourse.geta12.com/t/how-to-add-missing-fields-to-a-document/365)

<div class="topic-metadata">

**Author:** [@andreas-fresh-mesa](https://discourse.geta12.com/u/andreas-fresh-mesa)\
**Replies:** 1\
**Last updated:** [April 23, 2020, 1:35pm UTC](https://discourse.geta12.com/t/how-to-add-missing-fields-to-a-document/365 "2020-04-23T13:35:30Z")

</div>

I’m trying to do calculations on a document that has computed fields. However the json from which I deserialize the document does not contain all of the calculated fields. While running the computation I get the followin…

---

## [How to assign an enum value code to a string field using a computation?](https://discourse.geta12.com/t/how-to-assign-an-enum-value-code-to-a-string-field-using-a-computation/114)

<div class="topic-metadata">

**Author:** [@andreas-fresh-mesa](https://discourse.geta12.com/u/andreas-fresh-mesa)\
**Replies:** 3\
**Last updated:** [October 4, 2018, 7:59am UTC](https://discourse.geta12.com/t/how-to-assign-an-enum-value-code-to-a-string-field-using-a-computation/114 "2018-10-04T07:59:42Z")

</div>

I have a document model with a field containing an enumeration value and a field of type string. How can a computation assign the unlocalized enumeration value to that string field? For example in this document model: \<…
