Element Details: Calculated+Column
 Back


Available in: Logi Info Source code name: CalculatedColumn

A Calculated Column adds a new column in the DataLayer from other values in the same row, or from other token values. The column can be used like any other column.

Set the ID to the name of the new column.

Example: Suppose you have an Order table with Price and Qty. You could create a Total column with a Formula attribute like:

@Data.Price~ * @Data.Qty~

Element Group:Add and Replace Columns



ATTRIBUTES

Click attribute Name to drill down for more information.

NamePossible ValuesDescription
ErrorLimit
UserDefined
Error Limit sets the maximum number of times a Calculated Column can have an error. After the limit is reached, the Calculated Column returns an empty value. Error handling for Calculated Columns can be expensive in terms of performance when there are hundreds or thousands of errors. Error Limit can prevent too many errors.
ErrorResult
UserDefined
ErrorResult sets the value that is used whenever the Condition or script formula fails because of an error. For ConditionFilters, the default is "False". For CalculatedColumn and ExtraCrosstabCalculatedColum elements, the default is blank. Otherwise, the default is "???". Label's Caption attributes can have a script formula by making the first character the equals sign: "=".
Formula
UserDefined
(Required) A VBScript or JavaScript expression that returns a string or numeric value. Select the scripting engine from the Settings General element's ScriptingLanguage attribute.
ID
UserDefined
(Required) The ID attribute is a pervasive attribute that uniquely identifies an element within a definition file. The ID needs to be a unique value within the definition.
IncludeCondition
True
False
An expression that evaluates to a value of True or False. If the expression is blank, or evaluates to true the element is processed. If the expression evaluates to false, the element is skipped. Expressions should be in VBScript or JavaScript syntax. For .NET versions, the scripting language can be set in the _settings.lgx General element. For Java versions, the scripting language is always JavaScript. Typically, you would compare values using an operator, such as "@Session.value~ < 0". Use quotes when working with strings: "@Session.myValue~" == "SomeValue"
ScriptFile
UserDefined
Specifies the script file. If the script file is in the SupportFiles, no path is necessary. Otherwise, specify a full file system path location.



PARENT ELEMENTS

Click element to drill down for more information.

Authentication.SP
Authentication.SQL
DataLayer.Bookmarks
DataLayer.Cached
DataLayer.CSV
DataLayer.Definition List
DataLayer.Directory
DataLayer.ETL
DataLayer.Excel
DataLayer.Fixed Format File
DataLayer.Google App
DataLayer.Google Spreadsheet
DataLayer.GPX File
DataLayer.JSON
DataLayer.KML File
DataLayer.LDAP
DataLayer.Linked
DataLayer.Mongo Find
DataLayer.Mongo Map Reduce
DataLayer.Mongo Run Command
DataLayer.Plugin
DataLayer.REST
DataLayer.Scheduler
DataLayer.SimpleDB
DataLayer.SP
DataLayer.SQL
DataLayer.Static
DataLayer.Twitter
DataLayer.Web Feed
DataLayer.Web Scraper
DataLayer.Web Service
DataLayer.XML
Right.SP
Right.SQL
Right.Static
Right.XML File
User Roles.SP
User Roles.SQL
User Roles.Static
User Roles.XML File


CHILD ELEMENTS

Click element to drill down for more information.

Additional Script File


 Back to top


 Chart Debug