Set up a ServiceNow Table Data Source
A ServiceNow Table Data Source Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. fetches data from records in a ServiceNow Table. You can use this data to define answer options in Dropdown, Radio Button, or Multiselect questions and prefill answers in forms. Field users can choose answers based on values defined by ServiceNow columns. This topic describes how a ServiceNow Table Data Source works and how to set it up.
Available on the Advanced and Enterprise tiers:
Contents
How a ServiceNow Table Data Source works
A ServiceNow Table Data Source fetches data from records in a ServiceNow Table. You set up the Data Source to fetch values from the columns and records that you specify:
-
Enter Column Names to specify the columns to fetch.
-
Enter a query string to filter the records that the Data Source fetches.
Once the Data Source fetches the data from ServiceNow, you can use that data in your forms. When you add a Dropdown, Radio Button, or Multiselect question, you define the answer options based on the columns in the Data Source. When you dispatch the form, you can prepopulate answers in the form using data from ServiceNow.
How you select the data to fetch
When you configure a ServiceNow Table Data Source, you specify the columns and the records to fetch.
Column Selection
ServiceNow Table Data Sources Data sources, also known as "Lookups", are external sources of data that you upload or connect to TrueContext. You can reference this data in a form to populate answers or answer options. Data sources save typing, reduce errors, and make it easy to provide mobile users with only the relevant, most current data. fetch data from the columns you specify. By default, the Data Source fetches the Display Value of each column. You can choose to also fetch the column Database Value. The Database Value is crucial when you fully integrate TrueContext and ServiceNow using a Data Destination. This is because ServiceNow uses the Database Value to update fields.
Record filtering
By default, ServiceNow Table Data Sources fetch all the records in a Table. Use Record Filtering to limit the number of records that the Data Source fetches. To do that, you use a query string that you generate in ServiceNow.
Prerequisites to configure a ServiceNow Table Data Source
-
Your TrueContext account must be on the Advanced or Enterprise tier.
-
You must be either:
-
A TrueContext Admin user.
-
A member of a FormSpace FormSpaces are where forms are stored and organized in the TrueContext Web Portal. A TrueContext Team may have multiple FormSpaces, depending on their needs. Admins can set FormSpace permissions to control which users have access to the forms in that FormSpace. group with Can Create permissions.
-
-
Either a ServiceNow Connection already exists in your FormSpace, or you are a TrueContext Admin user and can create a ServiceNow Connection or modify an existing one to make it available in your FormSpace.
-
Note the Name of the ServiceNow Table to map data. To find the Table Name in ServiceNow, go to System Definition > Tables. The following example shows Table Names in ServiceNow:
Steps to configure a ServiceNow Table Data Source
-
Go to Forms & Integrations > Data Sources > CREATE DATA SOURCE > ServiceNow Table.
Result: The system opens a new ServiceNow Table Data Source in edit mode.
-
Enter a Name.
-
On the Data Retrieval and Format tab, configure how the Data Source fetches data, including the fetch frequency.
-
On the Connection tab, select an existing ServiceNow Connection or create a new one.
Tip:If the system doesn’t list the Connection you want to use, make sure it’s available in the same FormSpace.
-
Enter the Name of the Table from ServiceNow to fetch data from.
-
Specify the columns you want the Data Source to fetch.
-
Under Column Name, enter the name of your ServiceNow columns as shown in your ServiceNow tables. You must enter at least one column name for the Data Source to fetch.
Tip:Select Describe ServiceNow Table to open a list of your Table Column Labels and Column Names. Make sure to include the ServiceNow Column Name (not the label) in your Column Selection.
-
Select Include Database Value to fetch the Database Value. The system fetches the Database Value as a separate column.
The following example shows a Column Selection. The Data Source fetches the Display Value for all entered columns. It also fetches the Database Value for the columns that the user selected. In this case, the user selected the columns that have different Display and Database values.
Tip:We recommend that you only fetch the Database Value when it’s different from the Display Value.
The following example shows a CSV export of the data fetched by the Data Source:
The system uses the following format for each column heading:
-
Display Value—
ColumnName
-
Database Value—
ColumnName_dbValue
Tip:You can move each Column Name to change the order. The order you choose is the order displayed in the Form Builder and in CSV exports of the Data Source.
-
-
Enter a query string to filter the records you want the Data Source to fetch. To generate the query string in ServiceNow:
-
Navigate to the ServiceNow table that you want to fetch data from.
-
Select Show / hide filter.
-
Apply and Run filter rules.
-
Copy the query string:
-
Right-click the last filter of the list.
-
Select Copy query.
Result: The system copies the query string to your clipboard.
-
Info:The ServiceNow Topic Generate an encoded query string through a filter describes how to generate a query string in more detail.
Once you copy the query string, you paste it in your ServiceNow Table Data Source Record Filtering section. The following example shows a query string from ServiceNow in TrueContext.
-
-
Select Create to save your Data Source.
Tip:You can now use the Data Source to define answer options in Dropdown, Radio Button, or Multiselect questions, and to prefill question answers when you dispatch a form.