🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Parsed/Derived settable associations
This page was created by PageReplicator on 2025-09-01. Last edited by PageReplicator on 2025-09-01.

Template:Notice



<a href="/Training:Derived_attributes_%26_associations" title="Training:Derived attributes & associations" data-bs-title="Training:Derived_attributes_&_associations">Derived attributes & associations</a> are read-only, but you can also have writable associations that update other attributes or links when they themselves are set.

Read here about how that works on attributes: <a href="/Documentation:Derived_settable_attributes" title="Documentation:Derived settable attributes" data-bs-title="Documentation:Derived_settable_attributes">Derived settable attributes</a>.

<a href="/File:Derived_settable_class_example.png" class="image" data-bs-title="File:Derived_settable_class_example.png" data-bs-filetimestamp="20210218093931"><img alt="Derived settable class example.png" src="/images/thumb/9/94/Derived_settable_class_example.png/531px-Derived_settable_class_example.png" decoding="async" width="531" height="170" class="thumbimage" srcset="/images/9/94/Derived_settable_class_example.png 1.5x" /></a>
<a href="/File:Derived_settable_class_example.png" class="internal" title="Enlarge"></a>

OCL for reading Class2selection:

self.Class2

EAL for the writing Class2Selection:

self.Class2 := vInputParameter;
self.SelectionLog := self.SelectionLog + DateTime.Now.asString + ': '+ vInputParameter.Name + '\r\n'

The most common use case for this is to execute "extra" code for recalculating other persisted values based on the new value of a change to a link.

Here is the sample model to be loaded into the designer: <a href="/File:DerivedSettableExample.modlr" title="File:DerivedSettableExample.modlr" data-bs-title="File:DerivedSettableExample.modlr" data-bs-filename="DerivedSettableExample.modlr" data-bs-filetimestamp="">File:DerivedSettableExample.modlr</a>