Neon-styled illustration of a computer screen showing AL code with the text IS in AL and New IS Operator.

New operator in AL Language IS coming

1 min read

In the new pre-release version of AL Language, there is a new “IS” operator, ready to be used, but for now very limited.

💡 For now it’s targeted use, to use operator “IS” only for Interfaces.

AL code showing compile error Interface 'price' is missing while typing an is check against an interface.

AL example using is operator with interface name Price Calculation inside IsOperatorTest.

The is-operator is used to create an expression. It returns a Boolean result of true or false. This is compatible with the if-statement, which requires a Boolean context.

Let’s try out something like this:

Customer Card page extension code assigning PriceCalculation interface and checking it with is operator on OnOpenPage.

Now, upon opening Customer Card page:

Business Central message dialog: IncomingRecord is Price Calculation Interface!


Microsoft has confirmed that “IS” operator is coming for Interfaces but it’s also possible to expect in future to be expanded soon like this:

AL code snippet demonstrating is check against Database::Item in a Variant parameter.

💡 For now Database:: is being used but it’s being discussed to add Table:: at some point in future.

Business Central message dialog confirming MyVariant is a Item.

While its initial functionality may be restricted, the “IS” operator opens up new possibilities for more expressive and readable code in AL, enhancing the language’s ability to handle conditional logic efficiently.

What do you think about this new operator?

Stay tuned for more information! 🚀

Related posts

1 comment

  • MylesH

    Very interesting information!Perfect just what I was searching for!

Leave a comment

Reviewed before it appears.