ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / HFSQL properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
CalculatedItemExpression (Property)
In french: FormuleRubriqueCalculée
ODBCOLE DBNot available with these kinds of connection
The CalculatedItemExpression property is used to:
  • Find out the SQL expression that defines the value of an expression item (or calculated item). This item was defined in the data model editor or through programming.
  • Define the SQL expression that gives the value of an expression item (when describing the item through programming).
Native Connectors (Native Accesses) This property is available for the Native MySQL Connector.
Example
AFile is File Description
AnItem is Item Description
AnItem.Name = "CmdDate"
AnItem.CalculatedItemExpression = "'Written by ' + CURRENT_USER + ' on ' + SYSDATE"
AnItem.PersistedCalculatedItem = True
HDescribeItem(AFile, AnItem)
Syntax

Finding out the SQL expression defining the value of a calculated item Hide the details

Result> = <Data file>.<Item>.CalculatedItemExpression
<Result>: Character string
SQL expression defining the value of the item.
<Data file used>: File name
Name of the data file used.
<Item used>: Item name
Name of item used.
WINDEVWEBDEV - Server codeReports and QueriesUniversal Windows 10 AppiPhone/iPadIOS WidgetMac CatalystUser code (UMC)Ajax

Defining the SQL expression that returns the value of a calculated item Hide the details

<Item used>.CalculatedItemExpression = <SQL expression>
<Item used>: Item name
Name of the item used. This name was defined by the Item Description type.
<SQL expression>: Character string
SQL expression defining the value of the item.
Remarks
An expression item (or a calculated item) is an item whose content is calculated according to the associated SQL expression and to the values of items in the current record. For more details, see Data model editor: the different types of items.
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help