How to calculate boolean fields

We would like to compute a boolean field, but using AND or OR in the calculation gives an error.

[showVordrucke] AND [showAnleitungen]

leads to two errors:

  • The condition is not complete (yet). [MVK_INCOMPLETE_INPUT]
  • Corrupt input or condition not complete (yet): Unexpected found ‘AND’. [MVK_UNEXPECTED_TOKEN]

I could do this by using preconditions (one for each field of the computation table for boolean logic), but that doesn’t seem like a sustainable approach

Hi @sven-fierce-needle , the computation is missing a part to work correctly. […] just resembles the value of the field, but you need to state what the value should resemble so that the computation triggers. If in your case [showVordrucke] and [showAnleitung] are booleans the precondition could look like this:
[showVordrucke]==True and [showAnleitung]==True
For a more in depth answer more information to the usecase and the desired computation would be necessary. I hope the Information given so far could clarify the issue.

Hi, thanks for the quick answer, but I didn’t state the precondition as I didn’t see it as relevant for the answer. The precondition is:

[showMaster] == True And AllFieldsFilled(showAnleitungen, showVordrucke)

The usecase is: depending on several checkboxes, I want to hide/show other parts of the form

Hey, ok so from what I understand you want to use the computed boolean as a helperfield to hide/show certain parts of your form.
In this case the computation for the boolean would look like:

Precondition: [showMaster] == True And AllFieldsFilled(showAnleitungen, showVordrucke)
Calculation: True

Then in the FMM you can set a dependancy on the helperboolean to hide/show the parts when the boolean is True

Yes, that is (simplified) what it currently looks like. But instead of having four (actually even more) preconditions with constant calculations I would like to use boolean logic for the calculation to have only one precondition

[showMaster] == True And ([showVordruck] == True Or [showAnleitungen] == True) And AllFieldsFilled( ...
[showMaster] == True And [showVordruck] == Fase And [showAnleitungen] == False And AllFieldsFilled( ...
...

Precondition:

AllFieldsFilled(...

Calculation:

[showMaster] And ([showVordrucke] or [showAnleitungen])

Hey, sadly this cant be fullfilled by A12 as the computed boolean needs to be given an exact value in either “True”, “False” or the value of another boolean with […] in through the calculation.