---
sourceDocument: Yokohama Build or modify applications
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/yokohama/application-development

 Release :

    - yokohama

ft:locale :

    - en-US

ft:publication_title :

    - Yokohama Build or modify applications

ft:clusterId :

    - cadev

bundleId :

    - cadev

workflow :

    - Development, Data, and Analytics


---

# Create a multi-table processor

# Create a multi-table processor {#ariaid-title1}

* Release version: Yokohama
* 
* Updated January 30, 2025
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

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

## Before you begin

Role required: admin

## About this task

Note:  
This feature is deprecated. While legacy, existing custom processors continue to be supported, creating new custom processors has been deprecated. Instead, use the [Scripted REST APIs](https://www.servicenow.com/docs/access?context=c_CustomWebServices&version=yokohama&pubname=yokohama-api-reference&ft:locale=en-US)

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.

## Procedure

1. Navigate to AllSystem DefinitionProcessors.  
   The list of processors appears.
2. SelectNew.
3. Enter the following information.  

   |-|-|
   | Name | TableSize |
   | Type | Choose Javascript |
   | Description | Return number of records in a table |
   | Parameters | SIZE |
   | Path | \<leave empty\> |
   [ ]

   {#t_CreateMultiTableProcessor__table_jxj_zbf_hq}

   Script:  

       g_response.setContentType('text/html;charset=UTF-8');
       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() ) {
             count.addAggregate('COUNT');
             count.query();
             var records = 0;
             if (count.next()) {
               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. Select Save.
5. Test the new processor by entering the following URLs:  
   `https://<instancename>.service-now.com/incident.do?SIZE` and `https://<instancename>.service-now.com/sys_user.do?SIZE `  
   Your instance reports the number of records in the table. For example, `table incident has 82 records`.

*[\>]: and then


