DataWindow data and property expressions

Supported

  • The following DataWindow data expressions are supported:

    1. Syntax for one or all data items in a named column

      dwcontrol.Object.dwcolumnname{.buffer} {.datasource}{[rownum]}
    2. Syntax for selected data in a named column

      dwcontrol.Object.dwcolumnname{.Primary}{.datasource}.Selected
    3. Syntax for a range of data in a named column

      dwcontrol.Object.columnname{.buffer}{.datasource}[startrow,endrow]
    4. Syntax for a single data item in a DataWindow

      dwcontrol.Object.Data {.buffer}{.datasource}[rownum, colnum]
    5. Syntax for data in a block of rows and columns

      dwcontrol.Object.Data{.buffer}{.datasource}[startrow,startcol, endrow, endcol]
    6. Syntax for data in a single row or all rows

      dwcontrol.Object.Data{.buffer}{.datasource}{[rownum]}
    7. Syntax for all data from selected rows

      dwcontrol.Object.Data{.Primary}{.datasource}.Selected
  • The expression for accessing the text displayed in the column header is supported:

    dwcontrol.Object.ColumnName.Text
  • Basic syntax for DataWindow property expressions is supported:

    dwcontrol.Object.dwcontrolname{.property}.property{=value}
  • Setting or getting the value of a dot notation is supported, except that there is structure data in the expression

Unsupported

  • Getting the data value from a filter buffer according to the row number is unsupported. This is because data is stored in a different order in PowerServer than in PowerBuilder. For example, the following script is unsupported:

    dw_control.object.filter[startrow, startcol, endrow, endcol] //unsupported
  • Setting the value of a dot notation to a structure array, or setting a structure array to a dot notation, is unsupported. For example, the following syntax is unsupported:

    struct1 t[10]
    t = dw_1.object.data[1]
    

    Note: The PowerServer Unsupported Features Analysis tool cannot detect unsupported features in DataWindow dot notations. You must make sure the specifications about dot notations are satisfied in the application. Otherwise, it will cause errors. For more information on undetected features, refer to the Undetected Features section.

  • Selected and Data are unsupported to be directly accessed by a DataWindow object via the dot notation.

    For example:

    Unsupported script:

    ldwo_target.Primary = ldwo_column.selected //Unsupported
    

    Supported script:

    ldwo_target.Primary = dw_1.object.id.selected //Supported
    
  • It is unsupported to contain Data in a dot notation to obtain the data of a column. For example:

    Supported example:

    string ls_an
    dwobject dwo
    dwo = dw_1.object.id
    ls_an = string(dwo.data.primary[1])
    

    Unsupported example:

    string ls_an
    dwobject dwo
    dwo = dw_1.object.id
    ls_an = string(dwo.primary[1])
    
  • It is unsupported to use the following syntax in obtaining data in a row of a report.

    Unsupported script:

    dw_1.Object.dw_report[1] //Unsupported