PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Properties specific to the description of items by programming
  • How to describe the data files by programming?
  • Handling the items of a data file described by programming
  • Journalism
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
Item description (Type of variable)
In french: Description de rubrique (Type de variable)
HFSQLHFSQL Client/ServerAvailable only with these kinds of connection
An Item description variable is used to describe by programming one or more items found in a data file. The description of each item is validated by HDescribeItem.
After this validation:
  • This item can be handled like any other item described in the analysis.
  • The "Item description" variable is reinitialized and it can be used to describe another file item by programming.
Versions 18 and later
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
Universal Windows 10 App This type of variable is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Universal Windows 10 App This type of variable is now available in Universal Windows 10 App mode.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Example
MyItem is Item Description
MyItem1, MyItem2 are Item Descriptions
// Describe the AFile file
...
 
// Describe the "NAME" item
MyItem is Item Description
MyItem.Name = "NAME"
MyItem.Type = hItemText
MyItem.Size = 40
MyItem.KeyType = hUniqueKey
 
// Validate the description of the "NAME" item
HDescribeItem(AFile, MyItem)
 
// Validate the description of AFile file
...
Syntax

Declaring one or more item descriptions Hide the details

<Variable name> is Item Description

<Variable name 1>, <Variable name 2> are Item Descriptions
<Variable name>:
Name of the "Item Description" variable to declare.
Remark: The a and an keywords are optional: they provide better readability.

Describing an "Item description" variable Hide the details

To describe an "Item description" variable:
use the WLanguage properties specific to the item descriptions. For more details, see remarks.

To validate the description of an "Item description" variable:
Use HDescribeItem.
Remarks

Properties specific to the description of items by programming

The following properties are specific to the item descriptions:
Remark: The properties written in bold followed by a star must necessarily be initialized when describing an item by programming.
Property nameEffect
ComponentModify a component of a composite key
Versions 20 and later
TypeDescription
New in version 20
TypeDescription
TypeDescription
Specify the type associated with an Enumeration or Combination item.
KeyExpressionDefine the components of a composite key.
Versions 21 and later
CalculatedItemExpression
New in version 21
CalculatedItemExpression
CalculatedItemExpression
Define the SQL expression that returns the value of a calculated item (Expression item).
MaxThumbnailHeightDefine the maximum height of an item thumbnail.
LanguageDefine the parameters of the language used to perform the comparisons and the sort for a Unicode item.
LanguageDescribedDefine the parameters of the language used to perform the comparisons and the sort for a Unicode item.
MaxThumbnailWidthDefine the maximum width of an item thumbnail.
NbArrayElementNumber of elements in an array item.
Name ( * )Name of item.
NullTake the "NULL by default" option into account for the item.
Versions 16 and later
NullAllowed
New in version 16
NullAllowed
NullAllowed
Define whether the NULL value is allowed (or not) for the item.
Versions 21 and later
PersistedCalculatedItem
New in version 21
PersistedCalculatedItem
PersistedCalculatedItem
Define whether the value of a calculated item (Expression type) is stored in the data file.
DecimalPartDefine the number of digits in the decimal part of a Numeric item.
IntegerPartDefine the number of digits in the integer part of a Numeric item.
Versions 26 and later
GDPR
New in version 26
GDPR
GDPR
Define if the field is concerned by the RGPD.
AccentuationSensitiveTake the accented characters into account when performing searches on the item
CaseSensitiveTake the case (uppercase/lowercase characters) into account when performing searches on the item
PunctuationSensitiveTake the punctuation characters (comma, period, ...) into account when performing searches on the item
Size (* required depending on the specified type)Size of a text item (character string, text memo, character)
Size of a Time item.
KeySizeSize of the section to index in the text memo.
Versions 21 and later
TimestampType
New in version 21
TimestampType
TimestampType
Define the type of timestamp for the item.
Versions 21 and later
TimestampUTC
New in version 21
TimestampUTC
TimestampUTC
Define whether the time of a timestamp item is UTC or not.
Type (* )Identifies and modifies the type of an item.
KeyTypeCharacteristics of a key item.
SortTypeCharacteristics of the sort on an item.
DefaultValueDefault value of an item.
Versions 21 and later
CalculatedDefaultValue
New in version 21
CalculatedDefaultValue
CalculatedDefaultValue
Define the SQL expression returning the default value of the item.

Special case: Describing a composite key
When describing a composite key by programming, Type is optional. On the contrary, KeyExpression must be used to describe the composition of the composite key.
Versions 20 and later
Special case: Describing a Combination or Enumeration variable:
  • You must call TypeDescription to define the type used by the item.
  • It is necessary to specify the type with the Property Type before indicating the default value with the Property DefaultValue.
New in version 20
Special case: Describing a Combination or Enumeration variable:
  • You must call TypeDescription to define the type used by the item.
  • It is necessary to specify the type with the Property Type before indicating the default value with the Property DefaultValue.
Special case: Describing a Combination or Enumeration variable:
  • You must call TypeDescription to define the type used by the item.
  • It is necessary to specify the type with the Property Type before indicating the default value with the Property DefaultValue.
Versions 21 and later
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • It is necessary to specify the timestamp type with the Property TimestampType.
Special case: Describing an Expression item::
When description a formula wage type by programming, Property Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.
New in version 21
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • It is necessary to specify the timestamp type with the Property TimestampType.
Special case: Describing an Expression item::
When description a formula wage type by programming, Property Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.
Special case: Describing a Timestamp item:
  • The item must be a DateTime, Date or Time item.
  • It is necessary to specify the timestamp type with the Property TimestampType.
Special case: Describing an Expression item::
When description a formula wage type by programming, Property Type must not be used. You must use CalculatedItemExpression to describe the calculation expression.

How to describe the data files by programming?

To describe the data files by programming, you must:
  1. For each data file:
  2. Describe (if necessary) the characteristics of links via the HFSQL properties.
  3. If necessary, validate the description of each link (HDescribeLink function).

Handling the items of a data file described by programming

When creating a data file in the data model editor, the names of the data files and items are automatically recognized by the compiler.
When creating a data file using a variable of type "description of file", the names of of the data file and its fields are defined using Property nom. These names are not automatically recognized by the compiler. A compilation error occurs if these names are used to identify the data file or the items.
In order for the programmatically described of the data file names and its fields to be recognized by the compiler, it is necessary to declare the of the data file name as data source. Then, this data file and its items can be handled by their name in the code editor.
For example:
AFile is File Description
...
AFile.Name = "CUSTOMER"
...
HDescribeFile("CUSTOMER")
...
CUSTOMER is Data Source
...
HReadFirst(CUSTOMER, "CUSTNAME")
Remark: It is also possible to declare the name of the data file with the keyword External. However, the execution speed of process will be slower.

Journalism

When the data file is described by programming:
  • if the data file is logged and if no item is logged, all the items (except for the composite keys) are automatically logged.
  • if the data file is logged and if at least one item is logged, the other items are not modified.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment