Skip to the content.

hmRep_Create VStructure Field ( Area ; tableNo ; fieldNo ; caption) → ID

Introduced in v4.0, Preemptive: yes
Parameter Type In/Out Description
Area Longint hmReports area
TableNo Longint Table number
FieldNo Longint Field number
Caption Text Caption of the field
ID Longint ID of the item

Description

The command hmRep_Create VStructure Field creates a Virtual Structure item for a 4D Field. Pass the internal 4D Table number in the parameter tableNo. Pass the internal 4D Field number in the parameter fieldNo. To set a custom caption for the field, you can set the name in the parameter caption. If the command was successful, the unique ID is returned.

If the caption is an empty string, the field is not visible in the table drop down menu in the object properties.

If you want to add this virtual structure to the global virtual structure, just pass 0 in the parameter area. If you pass a valid area, the record goes to the virtual structure of the area.

Example

The example shows, how the create a Virtual Structure Item with a custom Table name:

var $vl_id : Integer

$vl_id:=hmRep_Create VStructure Field(hmRep; Table(->[x_Customers]); Field(->[x_Customers]x_ID); "ID")

The following example shows, how to hide a field in the object properties:

var $vl_id : Integer

$vl_id:=hmRep_Create VStructure Field(hmRep; Table(->[x_Customers]); Field(->[x_Customers]x_ID); "")