Enterprise Application Development

Fast Modeling, Responsive Design, One-Button Deploy

BOOK a Demo

Economic theory-based business modeling

Resources, Events, Agents

BOOK a Demo

New Feature: Before Collection Entity Behaviour
Posted February 2nd, 2023

New Feature: Before Collection Entity Behaviour
Posted February 2nd, 2023

Note: This feature was released with version 3.3.73 of the OMNIA Platform

Today we introduce a new development feature, in the form of a new Behaviour!

The new “Before Collection Entity Behaviour” is applied only to Entities that have a collection as a property and is triggered when an entry is added/initialized on a collection.

Updated Behaviour Menu

This new behaviour receives one parameter, called “entry”, representing the new entity added, like this:

 

void BeforeCollectionEntityInitialize(Entity entry)
{
}

 

This new behaviour doesn’t replace any existent one, it only adds to the entire OMNIA Platform’ flow, as represented below:

As you can see, there were some changes, with this new “Before Collection Entity Initialize” behaviour occurring right after the “Initializer” and before the “Before Change”.

 

Until now, to set a default value to a collection property it was required to implement an “Action/Change Behaviour” in the entity in order for it to trigger when a change happens and then use a “ForEach” loop through the collection entries, like this:

 

Collection.ForEach(line => {
line.description = "This is inefficient";
});

 

From now on if you intend to define a property of a new collection entry, you simply need to use this new behaviour. It’s not only simpler but will also give you performance enhancements because it will only work with the new collection entities.
 
Example:
 

line.description = "OMNIA ROCKS";

Platform Update and Documentation

This new feature is part of our 3.3.73 version of the platform, released today.

 

📄 Documentation

✉ Signup for our Newsletter to get our weekly news