Abandoning error rows

In some cases, you may want to enable users or your application to completely discard one or more error rows from the error DataWindow control. This can be useful for dealing with error rows that it is not desirable to repair.

Table 17-4 shows some techniques you can use for abandoning such error rows.

Table 17-4: Abandoning error rows

If you want to abandon

Use

All error rows in the error DataWindow control

The Reset function

One or more particular error rows in the error DataWindow control

The RowsDiscard function

For more information on coding these functions, see the PowerScript Reference.

Example

In the following example, users can choose to abandon all error rows in the dw_pipe_errors DataWindow control.

Providing a CommandButton When painting the w_sales_extract window, include a CommandButton control named cb_forgofixes. Write code in a few of the application’s scripts to enable this CommandButton when dw_pipe_errors contains error rows and to disable it when no error rows appear.

Calling the Reset function Next write a script for the Clicked event of cb_forgofixes. This script calls the Reset function:

dw_pipe_errors.Reset()

Together, these features let a user of the application click the cb_forgofixes CommandButton to discard all error rows from dw_pipe_errors.