Create a parametrized data item for your related list
Create a parametrized data item to contain the records that display in your related list.
Before you begin
Role required: admin
Procedure
Navigate to All > System Mobile > Mobile App Builder.
The Mobile App Builder appears in a new browser tab and displays the application scope selection screen.
Search for the application scope you're working in and then select the name of the application scope.
The Mobile App Builder categories home screen displays.
From the menu on the left side, select Data to display the data items for the scope.
Click the New button next to the Search field.
In the Create a data item window, select Data item, then click Continue.
A new data item control panel opens.
In the New data item panel, fill in these fields.
| Field | Description |
|---|---|
| Name | Name of the data item |
| Description | Brief description of the data item |
| Table | Table containing the records for your data item. Note: This is the table that contains records that appear in the related list, not the table for the record the list appears on. For example, if you want a list of incidents associated with a problem record, you would choose . |
| Group by | Field which the records are grouped by. \(Optional\) |
| Condition type | Whether the condition is Declarative, uses a Script or uses an Appended coded query. |
Create parameter items in the Parameters section.
Parameters contain values from the parent record that you can use in your conditions in the Condition section. You use these parameters in your condition to define how the related list records are related with the parent record. For more information on parameters, see Configure a parametrized data item.
Create a condition in the Condition section to filter the records that appear in your related list.
Include parameters created in the Parameters section using the Choose a parameter (
Choose parameter icon\) icon.
Create a separate condition in the Offline condition section.
The conditions in this section apply when you set the app to offline mode.
Click Save in the upper right corner to save your data item.
Example
In this example, you have a record screen that displays a problem record. On this screen, you wan to display a list of incidents associated with that problem. Since this related list contains incident records, you must create a data item for the Incident [incident] table.
Data item form
For the data item to show only incidents related to the parent record (a problem record in this case), we must create a data parameter for that information. To make it easy to identify, the parameter name is Problem data parameter. Since records are identified with a sys_id, the data parameter is a String type.
Data parameter form
In the condition section of the data item, create a condition for the Problem field on incident records. Use the parameter as the value. You select the parameter using the Choose a parameter (
Choose parameter icon\) icon. Once these steps are taken, your data item is ready to use.\[Omitted image "example-data-parm-2.png"\] Alt text: Completed parametrized data item