🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators equal to
Created by Charles on 2025-11-18 · Last edited by Colline.ssali on 2025-12-31.

Symbol (=)

The = operator is a comparison operator used to check whether two values are equal. It returns a Boolean result (true or false) and is commonly used in OCL constraints, validations, and conditional expressions.

Example:

self.Status = 'Active'

Here is an example that uses a Department collection to check a department name with the OCL equal-to (=) operator:

Department.allInstances->collect(x|x.DepartmentName='Legal')

or

Department.allInstances->exists(d | d.DepartmentName = 'Legal')

The equality operator (=) is used to compare each Department’s DepartmentName against a specific value within a Department collection.

Results

Documentation OCLOperators equal to 1767166356883.png