Calculated Properties

Properties within Entities can also be set to be "Calculated" within the App and when this checkbox is checked you are given the option of defining the calculation for the property. A very common use for this would be a database that has a first name field and a surname field, these would be properties in Evoke (linked to the database fields in data mappings) and then a further "User Interface Only" Property would be defined that is "calculated" as Firstname + Space + Surname. Examples are shown in the images on the right.
However, there are many other uses for Calculated Properties and Properties can can be calculated using one or more of the following types:
  • Arithmetic Expression - calculates a numeric value based on 2 or more Properties using "sum", "divide", "multiply" or calculate the "difference" of all the values in the Properties provided. Evoke will offer all the possible numeric Properties available e.g. Currency, Integer, Decimal, etc. You can select two values for the divide option; as many of the values as required for the sum or multiplication options; and add a sequence for the "difference" option by either selecting the options in a certain order or changing the sequence number.

  • Casing Conversion - this alters the case of a specified Alpha property value e.g. a name could be set to a) all lower case, b) First Letter Of All Words Is Uppercased or c) All Upper Case.

  • Collection Expression - this allows for a collection (multiple) properties to be a) averaged b) concatinated c) counted to return the number of values d) return the Highest of all the values e) return the lowest of all the values or f) summed. Evoke will ask you to select a source property , this will be a list of Entities (e.g. sales), then you select the related property, for example the sales price, which can be any property designated as a Currency, Integer, Decimal, etc numeric property.

  • Concatinate - this allows mutiple values to be concatinated (joined), in any order you specifiy, with or without a) separators (as for the Full Name givin in the example above) b) changing the the case (as above) and c) being trimmed (removing initial, trailing or intermediate spaces).

  • Value Conversion - this will convert a value to specific type e.g a date can be converted to a) the day of the specified date b) the day of the week c) the full date d) the full year e) the ISO date f) the long date g) the month h) the month name i) a short date or j) just the year

  • Javascript - this allows a Javascript expression to be entered into Evoke that calculates the value of the Property

  • Custom - 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

When you have completed your selection for the calculated property then use the accept or reject buttons to commit the calculation or cancel it.