🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
OCLOperators remove
Created by Stephanie on 2025-01-09 · Last edited by Vale.buyondo on 2026-02-03.

The remove operator is an executable action language command used to physically detach an object from a collection or association. Unlike the excluding operator, which only returns a filtered view of a list, remove modifies the actual data in the system.

Syntax

Collection.remove(itemToRemove)

Example

Scenario: A user selects several orders in a grid and clicks a button to remove them from the current Customer's record.

vSelected_Orders->collect(x | vCurrent_Customer.Orders.remove(x))

vSelected_Orders is the list of orders the user checked in the UI and vCurrent_Customer.Orders.remove(x)

removes each selected order (x) from the Customer's Orders list

What happens to the data

  • Before: The Customer is linked to 5 Orders.
  • After: If 2 orders were selected, the Customer is now linked to only 3 Orders.
  • Database: The Order objects are not deleted; only the association (the link) between the Customer and those specific Orders is removed.