Skip to main content

TableRowCount

The TableRowCount function is only supported in Studio. It returns the number of rows matching the Where Clause. The function looks for the first occurrence of an attribute whose data type is table and selects table rows using the Where Clause returning the number of selected rows.

Prototype

    TableRowCount(PreviousCase ; Where)

Arguments

    PreviousCase        String       By value  

Null (not defined) or equal to `N` - work on current case.

Where String By value

A valid string containing a Where clause

(Reference the next section SFHub Table Row Filter Syntax).

Returns

    Number

The number of selected rows

Exception

    Undefined

Undefined is returned if:

- PreviousCase is not empty and not a valid one

- Where is not a valid SQL statement

Example 

  TableRowCount( ; 'Material = \'Crude\'')

This will return 0 if:

  • there are no attributes of type table
  • attributes of type table are empty or null
  • no rows are selected

Otherwise, the function will return the number of selected rows.