PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Describing a composite key item through programming
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
The KeyExpression property is used to set the different components of a composite key. You can:
  • Find out the expression of a composite key (defined in the data model editor or through programming).
  • Define the expression of a composite key (when the data file is described through programming).
Versions 17 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This property is now available for iPhone/iPad applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This property is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This property is now available in Windows Store apps mode.
Universal Windows 10 App This property is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
MyItem1 is Item Description
MyItem2 is Item Description
CompositeKey is Item Description
...
// Declare the item 1
MyItem1.Name = "Item1"
MyItem1.Type = hItemText
MyItem1.Size = 20
HDescribeItem(MyFile1, MyItem1)
// Declare the item 2
MyItem2.Name = "Item2"
MyItem2.Type = hItemText
MyItem2.Size = 20
HDescribeItem(MyFile1, MyItem2)
// Declare the composite key
CompositeKey.Name = "CompItem"
CompositeKey.KeyExpression = "Item1+Item2"
HDescribeItem(MyFile1, CompositeKey)
HDescribeFile(MyFile1)
HCreation(Temp_File)
Syntax

Finding out the expression of a composite key Hide the details

Key expression> = <Data file>.<Item>.KeyExpression
<Key expression>: Character string
Name of the different items included in the composite key. These names of items are separated by the "+" character.
The name of the key item is returned if the key is not a composite key.
<Data file>: Character string
Name of the data file used. This name was defined in the data model editor or with the File Description type.
<Item>: Character string
Name of the key item used. This name was defined in the data model editor or with the Item Description type.

Defining the expression of a composite key Hide the details

<Item>.KeyExpression = <New expression>
<Item>: Character string
Name of the key item used. This name was defined by the Item Description type.
<New expression>: Character string
Name of the different items included in the composite key. These names of items are separated by the "+" character.
Remarks

Describing a composite key item through programming

When describing a composite key item through programming, the Type property is optional (unlike simple items defined programmatically). However, the composition of the key must be described using the KeyExpression property.
For more details on items described programmatically, see Item description.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment