The Dialog class / ui.Dialog methods |
Converts the program array index to the visual index for a given screen array.
arrayToVisualIndex( name STRING, index INTEGER )
When the end user sorts rows in a table, the program array index may differ from the visual row index.
Use this method to convert a program array row index (arr_curr()) to a row index as seen by the end user. For example, if you want to display a typical message with (current-row / total-rows), convert the current program array row to a visual row index before displaying the value:
MESSAGE SFMT( "Row: %1/%2", DIALOG.arrayToVisualIndex( "sr", DIALOG.getCurrentRow("sr") ), DIALOG.getArrayLength( "sr" ) )