{"title":"Boolean (logical) operators","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/devenv-al-boolean-operators/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-boolean-operators, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-boolean-operators","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Description of the Boolean operators in AL for Business Central.","date":"2024-07-01","meta":{"topic":"concept-article"},"outline":[{"level":1,"title":"Boolean (logical) operators","slug":"boolean-logical-operators","at":0,"chars":865},{"level":2,"title":"Boolean operators","slug":"boolean-operators","at":238,"chars":523},{"level":2,"title":"Related information","slug":"related-information","at":761,"chars":104}],"text":"# Boolean (logical) operators\nLogical operators can only be used with arguments that can be evaluated to a boolean. The result of a logical operation is a boolean. The following table shows the logical operators that are available in AL.\n## Boolean operators\nAs the following table shows, the not operator is a unary prefix operator. This means that it takes only one argument and is placed in front of the argument. The and, or, and xor operators are binary infix operators; they take two arguments and are placed between the corresponding arguments.\nOperator|Name|Expression|Resulting data type\nnot|Logical negation|not bool|Boolean\nand|Logical and|bool1 and bool2|Boolean\nor|Logical or|bool1 or bool2|Boolean\nxor|Exclusive logical or|bool1 xor bool2|Boolean\n## Related information\ndevenv-al-operators\ndevenv-al-arithmetic-operators\ndevenv-al-relational-operators"}