DATATABLE


10.5, PLBCMP GUI Only

square.png Properties

square.png Events

square.png Methods

square.png Instructions

 

The DATATABLE object provides the PL/B language a means of loading, storing, and manipulating a table of data that is maintained and referenced using a row and column orientation. The object attributes and behaviors are specified using PL/B properties and methods. To define a DATATABLE, use one of the following statement format:

 

(1)

[label]

DATATABLE

[%|^][arraysize]

(2)

[label]

DATATABLE

^,{target}

(3)

[label]

DATATABLE

^(arraysize),({target}),...,({target})

 

Where:

label

Optional. A Data Label.

%

Optional. Denotes the item as being GLOBAL.

arraysize

Required. An integer decimal constant, CONST variable, or EQUATEd value indicating the number of array items.

^

Optional. Denotes the item as being a POINTER.

target

Required. The name of a previously defined data item of the same type.

Flags Affected: NONE

Note the following:

  1. The DATATABLE is supported in CREATE, GETPROP, and SETPROP instructions.

  2. A newly created DATATABLE does not have a user interface to view and perform actions. This allows a PL/B program to create, manage, and maintain one or more DATATABLE objects as virtual tables of data for an application.

  3. A program can bind a DATATABLE to a PL/B HTMLCONTROL object when an application requires an interface. When bound to a HTMLCONTROL, the generation and presentation of the data is through the 'BootStrap 5' framework. More information about 'BootStrap 5' is available at this link:

  4.  

    https://getbootstrap.com/docs/5.0

     

  5. The COLUMNS collection allows access to the DATATABLE columns using the GETPROP or SETPROP statements. The collection uses the following format:

  6.  

    [label] GetProp {object}.Columns({key}),{property}

     

    Where:

    label
    Optional. A Program Execution Label.
    object
    Required. A DATATABLE object that is accessed.
    key
    Required. A decimal number or Numeric Variable that is zero-based position of the column. Or,the key can be specified using a Character String Variable or literal using the 'column identification'. The 'column identification' is defined using the *ID parameter for the 'AddColumn' method.
    property
    Required. The remaining line of the statement.

     

  7. The ROWS collection allows direct access to the DATATABLE rows using the GETPROP or SETPROP statements. The collection uses the following format:

  8.  

    [label] GetProp {object}.Rows({key}),{property}

     

    Where:

    label
    Optional. A Program Execution Label.
    object
    Required. A DATATABLE object that is accessed.
    key
    Required. A decimal number or Numeric Variable that specifies a zero-based position of a row.
    property
    Required. The remaining line of the statement.
     
  9. The DATATABLE object supports events that are generated by user interface actions through the bound HTMLCONTROL. The events only take affect after the DATATABLE is bound to a HTMLCONTROL. The EVENTREGISTER statement associates the events to execution lablels.

 

 

See Also: Object Definitions, Object Output Instructions



PL/B Language Reference DATALIST DATETIME