Custom Calculated Entity Property

The Custom Calculated Property, for Entities, allows you to add your own property calculation if the large variety of standard calculated properties in Evoke do not do exactly what you need.
Use the define button, available when you click that a Value is calculated and then select custom as the calculated property Calculation type.
This will add software "hooks" to allow you to simply and easily add some specific custom code into your Visual Studio project to calculate the value of the Property.



Visual Studio Solution

In the Visual Studio Solution you will need to navigate, in the Solution Explorer, to the Web project (please see image below right).
Locate the Scripts folder and within that the Entities folder. Within the Entities folder you will need to locate the file "Entity.yourentityname.js" (where the entity name is the name of the Entity in which you have created the custom calculated property.
This is the Evoke "custom code file" that you can add the code for your custom calculated property to.
The image on the right (just as all image in these help pages) may be clicked to see a much larger version.
In this file you will find the code hooks for your custom code relating to the Entity. An example for the Custom Calculated Property is given at the bottom of this file.
Simply start with the Property Name that you gave your custom calculated property in your Entity definition and then add your custom Javascript to perform the tasks that you want for your calculated property.

An example of a simple custom calculated property, to switch the value of a property, with use of "this" to pickup another property in the same entity appears on the left.

There are many ways to learn Javascript online, e.g. Example online school and if you get stuck you can contact Evoke Support at BlueFinity.