> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# create_trigger_by_range

### create\_trigger\_by\_range

<ul>
  <li>
    create\_trigger\_by\_range(\
    &#x20;request\_id: string,\
    &#x20;table\_names: string\[],\
    &#x20;column\_name: string,\
    &#x20;min: number,\
    &#x20;max: number,\
    &#x20;options?: Record\<string, string>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeResponse.md)>

    Sets up a simple range trigger for a column\_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via `insert_records` with the chosen column\_name's value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default '9001' but able to be retrieved via `show_system_status`) for any listening client to collect. Active triggers can be cancelled by using the `clear_trigger` endpoint or by clearing all relevant tables.The output returns the trigger handle as well as indicating success or failure of the trigger activation.

    #### Parameters

    <ul>
      <li>
        request\_id: string

        User-created ID for the trigger. The ID can be alphanumeric, contain symbols, and must contain at least one character.
      </li>

      <li>
        table\_names: string\[]

        Tables on which the trigger will be active, each in \[schema\_name.]table\_name format, using standard name resolution rules.
      </li>

      <li>
        column\_name: string

        Name of a numeric column\_name on which the trigger is activated.
      </li>

      <li>
        min: number

        The lower bound (inclusive) for the trigger range.
      </li>

      <li>
        max: number

        The upper bound (inclusive) for the trigger range.
      </li>

      <li>
        `Optional`options: Record\<string, string>

        Optional parameters.
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeResponse.md)>

    Promise\<Types.CreateTriggerByRangeResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:7264](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L7264)</li>
    </ul>
  </li>
</ul>

### create\_trigger\_by\_range\_request

<ul>
  <li>
    create\_trigger\_by\_range\_request(\
    &#x20;request: [CreateTriggerByRangeRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeRequest.md),\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md),\
    ): Promise\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeResponse.md)>

    Sets up a simple range trigger for a column\_name for one or more tables. Once the trigger has been activated, any record added to the listed tables(s) via `insert_records` with the chosen column\_name's value falling within the specified range will trip the trigger. All such records will be queued at the trigger port (by default '9001' but able to be retrieved via `show_system_status`) for any listening client to collect. Active triggers can be cancelled by using the `clear_trigger` endpoint or by clearing all relevant tables.The output returns the trigger handle as well as indicating success or failure of the trigger activation.

    #### Parameters

    <ul>
      <li>
        request: [CreateTriggerByRangeRequest](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeRequest.md)

        Request object containing the parameters for the operation
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/nodejs/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[CreateTriggerByRangeResponse](https://docs.kinetica.com/content/api/nodejs/interfaces/CreateTriggerByRangeResponse.md)>

    Promise\<Types.CreateTriggerByRangeResponse> - Promise resolving to the response

    <ul>
      <li>Defined in [src/GPUdb.ts:7223](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L7223)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.