A related list on a Mobile App Builder record screen is a tab that opens the records linked to the record the user is viewing, such as the incidents attached to a problem. In the Brazil release you build one from a parametrized data item, a list screen and a relationship mapping.
What the related list tab does for the user
On a mobile record screen, a related list appears as its own tab. The user opens the record, taps the tab, and sees the records that connect back to it. A problem record with a tab of its linked incidents is a common case. The tab draws on a reference relationship between two tables, so it shows links the platform already holds.
Check the relationship before building
Relationships defined by a reference field between two tables are the ones this component supports. Custom relationships from the Relationships table and scripted relationships are not supported, so confirm the reference field on the real tables first. For other setup mistakes on mobile, see common ServiceNow mobile experience mistakes.
The build runs in three tasks: a parametrized data item for the related records, a list screen that uses it, and a record screen update that adds the tab. Start in All > System Mobile > Mobile App Builder, choose your application scope, and the categories home screen opens.
Step 1: Build the parametrized data item
From the left menu on the categories home screen, select Data. Click New beside the Search field, choose Data item in the Create a data item window, and click Continue. The data item panel holds these fields:
| Field | What to enter |
|---|---|
| Name | A name you will recognize when you pick the data item later |
| Description | A short note on what the list contains |
| Table | The table that holds the records shown in the list |
| Group by | Optional. The field the records are grouped by |
| Condition type | Declarative, Script, or Appended coded query |
The Table field is where the errors usually start. Select the table holding the list’s records, not the table of the record the list sits on. For incidents tied to a problem, choose Incident. Choosing Problem gives you problems rather than the incidents you wanted. For the problem record itself, see the explainer on problem records.
The data item also needs a way to receive the parent record. Create a parameter in the Parameters section. In the worked example the parameter is named Problem data parameter and typed String, because records are identified by sys_id and a string holds that value. The other types are Integer, Decimal, Boolean, Datetime and Date.
In the Condition section, add a condition on the field that links the list records to the parent. In the example that is the Problem field on incident records. Set its value to your parameter by choosing it with the Choose a parameter icon. The data item then shows the incidents linked to the open problem. For how conditions narrow a related list in general, see the related list conditions guide.
The Offline condition section is optional and applies when the app is in offline mode. Save with the Save button in the upper right corner.
Step 2: Create the list screen
Go to Screens in the left menu and click New. In the Create a screen window, choose the List card. Under Properties, enter a name and description, pick an icon with the Choose button in the Icon section, and save with the Save button in the upper right corner.
In the Screen segments section, click New. In the new segment panel, click New in the Streams section. In the New list stream panel, click Choose in the Data item section and select the parametrized data item from Step 1.
Return to the list screen by selecting it at the top of the configuration tree. Then, in the UI Parameters section, click New. A UI parameter is the link between the data item and the list screen, and it holds the value the list receives from outside. Enter a name and description and leave the other fields at their defaults. In Screen data parameter mapping, click Choose and select the data parameter from your data item. Its name appears in the Parameters section of the data item, so you can check the spelling there. Using the same name on both sides, such as Problem, makes the mapping easy to verify. Save the list record.
Step 3: Add the related list to the record screen
Open the record screen that should show the tab. In the control panel, find the Record screen segments list and click New, then choose Record screen section. The Order field sets where the segment sits, and segments display from the lowest Order value to the highest.
In the segment’s Embedded screen section, click New and select Related Lists in the Create a screen window. The New related lists screen opens:
| Field | What it controls |
|---|---|
| Name | The name of the related list |
| Description | A note describing the related list |
| Show count | Whether the tab displays a count of records |
| Hide screen name | Whether the screen name appears on the tab |
| Available offline | Whether the list can be opened offline |
| Table | The table used by the record screen, not the list’s record table |
| Icon | The icon for the related list |
The Table field mirrors the data item’s Table field. The data item points at the child records. This field points at the table of the record the user already has open, which is Problem in the example.
In the Related list mapping section, click New. In the Related list map panel, choose the Relationship. For incidents on a problem record, that is Incident->Problem. Then, in the Destination screen section, click Choose and select the list screen from Step 2. Save the record screen.
The tab now appears, and tapping it shows the records. In the worked example, the confirming step is logging out of the app and back in, after which the related list shows on the problem record screen.
Record screen settings that shape the tab
Fetch type controls when the data loads. Prefetch loads it while the user is on a list, calendar or record screen. From the Yokohama family release it no longer pre-loads embedded record screen data when the user is on a list screen. On-demand waits until the user navigates to the screen. Background loads embedded screens and segments in the background. Dynamic loads the first 10 rows as Prefetch and the rest On-demand, and the Dynamic prefetch count field sets how many rows prefetch.
View Using offers Legacy Card or Card for the record header. Hide Screen Name hides or shows the screen name on the record screen.
UI parameters carry an input type that sets how a value is entered, such as a QR/Barcode scan.
Related list tab or embedded list
The two patterns solve similar problems and are easy to mix up. An embedded list sits inside a record screen segment, so users see the records without leaving the form. The worked example is a list of computer parts on a work order form. A related list sits behind its own tab. Typically, an embedded list suits a short set of records shown beside the form, and a related list suits a longer set that needs room of its own. That is a design judgment, not a ServiceNow rule.
Setup differs as well. For an embedded list, go to Screens, select the record screen and then the segment, click Choose in the Embedded screen section, find the screen in the Choose an item pop-up, and click Apply. A list section takes one embedded screen. To swap it, remove the current one with the remove icon first.
An embedded list can have an empty state, which appears when no records exist.
Counts, offline access and common errors
Show count adds a number to the related list tab. That number follows the relationship you selected, but the destination list can show fewer records because additional conditions apply. A tab reading 12 may open a list of 9, which is expected rather than a mapping fault.
Available offline controls whether the list opens without a connection. For the wider picture of offline data on mobile, see offline mode and caching in ServiceNow mobile apps. The data item’s Offline condition decides which records are present in that mode, and it is edited separately from the online condition. Test the list offline against the same parent record you used online, and compare the rows.
Related list problems usually trace back to four places. The data item points at the parent table instead of the child table. The related list screen points at the child table instead of the parent. The screen parameter is not mapped to the data parameter, so the list has no record to filter on. The mapped relationship does not match the reference field the data item filters on. For a wider set of fault checks on mobile, see the mobile experience troubleshooting guide.
Frequently asked questions
Can a related list use a custom relationship?
No. The related list component supports relationships defined by a reference field between two tables. Custom relationships from the Relationships table and scripted relationships are not supported.
Which table goes in the data item?
The table that holds the records you want in the list. For incidents linked to a problem, that is Incident. The related list screen uses the parent table, which is Problem in the example.
Why does the number on the tab differ from the list?
The count follows the relationship you selected, and additional conditions on the destination list can reduce the rows shown. A shorter list than the count is expected in that case.
Can users open the related list without a connection?
Yes, when Available offline is selected on the related list screen. The offline list is driven by the data item’s Offline condition, which is edited separately from the online condition.