LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • BDK Book Library
  • AWS S3
    • Copy Item To a Folder
    • Create Folder In Another Folder
    • Delete Item
    • Download a File
    • Get Folder At a Path
    • Get Root folder From a Bucket
    • Get Buckets From S3
    • Get a Folder's Items
    • Move Item To a Folder
    • Rename Item
    • Upload File To a Folder
  • HTTP
    • DELETE Request
    • GET Request
    • HEAD Request
    • PATCH Request
    • POST Request
    • PUT Request
  • Microsoft Excel
    • Clear the Worksheet Range
    • Create a Table on a Worksheet Range
    • Create a Worksheet Range in a Sheet
    • Delete a Column from the Table
    • Delete a Row from the Table
    • Get the Cell's Color
    • Get the Cell's Formula
    • Get the Cell's Value
    • Get the Column's Cells from the Table
    • Get the Column Count in a Table
    • Get the Column Count in a Worksheet Range
    • Get the File's Sheets
    • Get the Following Row Range In a Worksheet Range
    • Get the Row's Cells from the Table
    • Get the Row's Cells From the Worksheet Range
    • Get the Row Count in a Table
    • Get the Row Count in a Worksheet Range
    • Get the Sheet's Tables
    • Get the Sheet's Used Range
    • Get the Worksheet Range's Rows
    • Get the Worksheet Range from the Table
    • Insert a New Column in the Table
    • Insert a New Row in the Table
    • Read the Content from a Table
    • Read the Content from a Worksheet Range
    • Retrieve the Columns from the Table
    • Retrieve the Rows from the Table
    • Retrieve the Worksheet Range from a Table
    • Set the Cell's Content to a Value
    • Set the Cell's Formula to a Formula Value
    • Write the Content in a Table
    • Write the Content in a Worksheet Range
  • Microsoft Outlook
    • Delete Emails
    • Download an Attachment
    • Forward an Email
    • Get a User's Events
    • Get an Email's Attachments
    • Get Event's Attachments
    • Get Email Folders for a User
    • Get Email Folders
    • Get Events in Calendar
    • Get Events
    • Get Outlook Emails
    • Mark Emails
    • Move Outlook Emails
    • Reply to an Email
    • Send an Email
  • Microsoft SharePoint
    • Add a Column to a SharePoint List
    • Add an Item to a SharePoint List
    • Copy an Item to a Folder
    • Create a Folder in a Document Library
    • Create a Folder in Another Folder
    • Create a List in a SharePoint Site
    • Delete a Column from a List
    • Delete a List in SharePoint
    • Delete an Item from a List
    • Delete an Item from a Document Library
    • Download a File
    • Edit an Item
    • Get a Folder
    • Get a Folder's Items
    • Get a Root Folder from a Document Library
    • Get a SharePoint List as a Table
    • Get Items from a Document Library
    • Get Items from a SharePoint List
    • Get Document Libraries
    • Get Sites from SharePoint
    • Move an Item to a Folder
    • Rename a Column in a List
    • Rename a SharePoint List
    • Rename a SharePoint Item
    • Retrieve Column Definitions from a SharePoint List
    • Retrieve Lists within a SharePoint Site
    • Upload a File to a SharePoint Document Library
  • OpenWeather
    • Get the Current Temperature
  • Slack
    • Read Messages
    • Retrieve a Channel
    • Retrieve a User
    • Send a Message
  • ServiceNow
    • Create Record
    • Delete Records
    • Retrieve Records
    • Update Record
  • Truckmate
    • Create An Order in Truckmate
    • Update An Order in Truckmate
  • Twilio
    • To Read Some SMS Messages
    • To Send an SMS Message
Powered by GitBook
On this page
  • Syntax
  • Examples

Was this helpful?

Export as PDF
  1. ServiceNow

Retrieve Records

Retrieves a list of ServiceNow records based on specified filters.

To use this procedure, make sure your agent has learned the Servicenow Book (BDK).

Syntax

retrieve some records from servicenow [whose condition]

Retrieves a list of ServiceNow records based on the specified filters. It can optionally filter based on a given condition.

Base Syntax

retrieve some records from servicenow

  • What does it do? This is the base syntax for the procedure.

  • Where does it go? This phrase should be written on a new line.

  • Is it required? ✅ Yes — This part of the phrase is required.

  • Does it require input data? ⛔ No — This phrase does not require input data.

Filter Condition Syntax

whose [condition]

  • What does it do? This is an optional clause used to specify a condition for filtering.

  • Where does it go? If used, this clause immediately follows the retrieve some records from servicenow phrase on the same line.

  • Is it required? 🌟 No — This clause is optional in the syntax.

  • Does it require input data? ✅ Yes — This clause requires a condition (a filter expression) to be specified.

the table name is

What does it do? Specifies the table name from which to retrieve records.

Where does it go? This phrase should be indented beneath retrieve some records from servicenow

Is it required? ✅ Yes — This phrase is required in the syntax.

Does it require input data? ✅ Yes — This phrase requires a text value to be specified as the table name.

Example: the table name is "incident"

the limit is

What does it do? Specifies the limit of objects to be returned.

Where does it go? This phrase should be indented below retrieve some records from servicenow

Is it required? 🌟 No — This phrase is optional in the syntax.

Does it require input data? ✅ Yes — This phrase requires a text value to be specified.

Example: the limit is "10"

Examples

1. Retrieve all incidents from the 'incident' table

retrieve some records from servicenow
    the table name is "incident"

2. Retrieve all incidents from the 'incident' table whose number is 'INC0010001'

retrieve some records from servicenow whose number is "INC0010001"
    the table name is "incident"

3. Retrieve all incidents from the 'incident' table whose created date is after '2022-01-01'

the date is "2024-02-25T12:30:00Z"
get the date as a datetime
use the above as the target
retrieve some records from servicenow whose "sys_created_on" is greater than the target
    the table name is "incident"

4. Retrieve 5 incidents from the 'incident' table

retrieve some records from servicenow
    the table name is "incident"
    the limit is "5"

Last updated 3 days ago

Was this helpful?