Endpoint Update a Table Row
Name
update_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: SysId Row 'sys_id' |
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 | |
| sys_id |
DT_WSTR
|
nvarchar(500)
|
500 |
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 update a table row:
| Required Parameters | |
|---|---|
| TableName | Fill-in the parameter... |
| SysId | Fill-in the parameter... |
| Optional Parameters | |
| ContineOn404Error | True |
ODBC application
Use these SQL queries in your ODBC application data source:
Update an incident
UPDATE incident
SET cause = 'A bug in the software'
,severity = 3
,incident_state = 2
WHERE sys_id = 'SYS_ID_GOES_HERE'
update_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:
Update an incident
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE incident
SET cause = ''A bug in the software''
,severity = 3
,incident_state = 2
WHERE sys_id = ''SYS_ID_GOES_HERE''';
EXEC (@MyQuery) AT [LS_TO_SERVICENOW_IN_GATEWAY];
update_table_row endpoint belongs to
[Dynamic Table]
table(s), and can therefore be used via those table(s).