Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Create a multi-table processor

Log in to subscribe to topics and get notified when content changes.

Create a multi-table processor

Create a multi-table processor that reports the number of rows in any table on your instance.

About this task

The multi-table processor protects itself from performance and security violations by confirming that the user is authorized to read the table. It does not report on certain tables that are too large to query safely.


  1. Navigate to System Definition > Processors.
    The list of processors appears.
  2. Click New.
  3. Enter the following information.
    Name TableSize
    Type Choose Javascript
    Description Return number of records in a table
    Parameters SIZE
    Path <leave empty>


    if(g_target === 'sys_email' || g_target === 'sys_log' ) 
      g_processor.writeOutput(g_target + ' table is too large to quickly count');
      } else {   
        var count = new GlideAggregate(g_target);
        if( count.canRead() ) {
          var records = 0;
          if ( {
            records = count.getAggregate('COUNT');
           g_processor.writeOutput('table ' + g_target + ' has ' + records + ' records');
          } else {
           g_processor.writeOutput('You do not have access to table ' + g_target);
  4. Click Save.
  5. Test the new processor by entering the following URLs:
    Your instance reports the number of records in the table. For example, table incident has 82 records.