Endpoint Delete a Table Row
Name
insert_table_row
Description
Insert a row into the table. [API reference]
Related Tables
Parameters
| Parameter | Required | Options | ||||||
|---|---|---|---|---|---|---|---|---|
|
Name:
Label: TableName Table name |
YES | |||||||
|
Name:
Label: Allow Label as Input Value (Default: false - Use Id for reference field) When AllowDisplayValueAsInput is enabled, ServiceNow may accept display values for reference fields, but the resolved value may be inconsistent across fields and instances. For deterministic behavior, always use sys_id values. |
|
Output Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| sys_id |
DT_WSTR
|
nvarchar(32)
|
32 | |
| [$parent.Pivot_Name$] |
DT_WSTR
|
nvarchar(2000)
|
2000 |
Input Columns
| Label | Data Type (SSIS) | Data Type (SQL) | Length | Description |
|---|---|---|---|---|
| [$parent.Pivot_Name$] |
DT_WSTR
|
nvarchar(2000)
|
2000 |
Examples
SSIS
Use ServiceNow Connector in API Source or in API Destination SSIS Data Flow components to read or write data.
API Destination
This Endpoint belongs to the [Dynamic Table] table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to delete a table row:
| Required Parameters | |
|---|---|
| TableName | Fill-in the parameter... |
ODBC application
Use these SQL queries in your ODBC application data source:
Create an incident
<p>Creates a new incident record.</p>
INSERT INTO incident(incident_state, severity, category, cause)
VALUES (3, 1, 'software', 'Missing a software feature.')
Create an incident using display values
<p>This example demonstrates how to create a new <code>incident</code> record by supplying <strong>human-readable labels (display values)</strong> for reference fields instead of their underlying <code>sys_id</code> values.</p> <p>Normally, ServiceNow requires reference fields (such as <code>caller_id</code> or <code>assignment_group</code>) to be populated using the target record's <code>sys_id</code>. In this example, label-to-ID resolution is explicitly enabled using <code>AllowDisplayValueAsInput='true'</code>, allowing display values to be passed instead.</p> <p>This approach is useful for ad-hoc operations, demos, or interactive usage. For automated or high-volume integrations, using <code>sys_id</code> values is strongly recommended.</p>
-- Create a new Incident using DISPLAY VALUES (labels) for reference fields
-- Instead of passing sys_id values, this example uses human-readable labels.
-- This works ONLY because AllowDisplayValueAsInput='true' is specified.
INSERT INTO incident
(
short_description,
incident_state,
severity,
category,
caller_id, -- reference to sys_user
assignment_group -- reference to sys_user_group
)
VALUES
(
'Email service is intermittently failing',
2, -- In Progress
1, -- High severity
'software',
'John Doe', -- LABEL (user display name), not sys_id
'Network' -- LABEL (group name), not sys_id
)
WITH(AllowDisplayValueAsInput='true')
insert_table_row endpoint belongs to
[Dynamic Table]
table(s), and can therefore be used via those table(s).
SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Create an incident
<p>Creates a new incident record.</p>
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO incident(incident_state, severity, category, cause)
VALUES (3, 1, ''software'', ''Missing a software feature.'')';
EXEC (@MyQuery) AT [LS_TO_SERVICENOW_IN_GATEWAY];
Create an incident using display values
<p>This example demonstrates how to create a new <code>incident</code> record by supplying <strong>human-readable labels (display values)</strong> for reference fields instead of their underlying <code>sys_id</code> values.</p> <p>Normally, ServiceNow requires reference fields (such as <code>caller_id</code> or <code>assignment_group</code>) to be populated using the target record's <code>sys_id</code>. In this example, label-to-ID resolution is explicitly enabled using <code>AllowDisplayValueAsInput='true'</code>, allowing display values to be passed instead.</p> <p>This approach is useful for ad-hoc operations, demos, or interactive usage. For automated or high-volume integrations, using <code>sys_id</code> values is strongly recommended.</p>
DECLARE @MyQuery NVARCHAR(MAX) = '-- Create a new Incident using DISPLAY VALUES (labels) for reference fields
-- Instead of passing sys_id values, this example uses human-readable labels.
-- This works ONLY because AllowDisplayValueAsInput=''true'' is specified.
INSERT INTO incident
(
short_description,
incident_state,
severity,
category,
caller_id, -- reference to sys_user
assignment_group -- reference to sys_user_group
)
VALUES
(
''Email service is intermittently failing'',
2, -- In Progress
1, -- High severity
''software'',
''John Doe'', -- LABEL (user display name), not sys_id
''Network'' -- LABEL (group name), not sys_id
)
WITH(AllowDisplayValueAsInput=''true'')';
EXEC (@MyQuery) AT [LS_TO_SERVICENOW_IN_GATEWAY];
insert_table_row endpoint belongs to
[Dynamic Table]
table(s), and can therefore be used via those table(s).