Getting the Row Count or the Column Count of an Active Data Asset

To get the row count and the column count of an active data asset, you can insert the respective Get Row Count and Get Column Count steps into a visual test that is associated with the asset.

  1. You can insert these steps into a visual test in the following ways:
    • Select Insert > ActiveData > Get Row Count or Insert > ActiveData > Get Column Count in the Silk Test Workbench menu.
    • Select Actions > Insert > ActiveData > Get Row Count or Actions > Insert > ActiveData > Get Column Count in the Test Steps pane of the visual test.
    • Right-click into the Test Steps pane of the visual test and select Insert > ActiveData > Get Row Count or Insert > ActiveData > Get Column Count.
  2. In the Properties window for these steps, perform the following actions:
    1. Select the associated active data asset to use.
    2. Select whether to run a row count or a column count.
    3. Select what variable to put the result in. The result will always be saved in the st_LastReturnValue reserved variable. It is not required to select a local variable. The result is also saved in the Result Detail column of the test step in the Details pane of the test result.

If the Get Row Count or Get Column Count steps are used within a Repeat using ActiveData loop, the number of rows is based on the start and end row that is configured in the Repeat using ActiveData step. For example, if the active data file has 10 rows, but the Repeat using ActiveData loop is configured to use only the rows 2 to 6, the Get Row Count step returns 5.

If the steps are used outside of a Repeat using ActiveData loop, they return the actual number of rows and column in the active data file.