PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Describing a composite key item by programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
..KeyExpression is used to configure the different components of a composite key. You can:
  • Find out the expression of a composite key (defined in the data model editor or by programming).
  • Define the expression of a composite key (when the data file is described by programming).
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> = <File name>.<Item name>..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.
<File name>: Character string (with or without quotes)
Name of data file used. This name was defined in the data model editor or by the File description type.
<Item name>: Character string (with or without quotes)
Name of the key item used. This name was defined in the data model editor or by the Item Description type.

Defining the expression of a composite key Hide the details

<Item name>..KeyExpression = <New expression>
<Item name>: Character string (with or without quotes)
Name of the key item used. This name was defined by the Item Description type.
<New expression>: Character string (with quotes)
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 by programming

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