Configure a relationship data item for an embedded list
Configure relationship data items so you can control the information that appears in embedded lists within a record screen.
始める前に
Role required: admin
このタスクについて
A relationship data item is required to create an embedded list. Embedded lists are lists that can be embedded within a record screen. For more information on embedded lists in mobile, see Embedded lists for a record screen.
手順
-
Navigate to All > System Mobile > Mobile App Builder.
The Mobile App Builder opens in a new browser tab and displays the application scope selection screen.
-
Search for the application scope you are working in and then select the name of
the application scope.
The Mobile App Builder categories home screen displays.
- Select the Data category from the menu, and then select New.
- Select the Relationship data item icon, and then select Continue.
-
Complete the following fields as needed.
表 : 1. Relationship data item fields Field Description Properties section: Name A title for the data item. You can have multiple data items with the same name. Make sure that this name is unique so that you can find it easily. Description Optional additional details about the data item. Data section: Table The table you want the data item to pull information from. This table is the table of records that is embedded as list on the parent record screen. 注:Custom tables are not available by default. You can change this behavior by modifying the subscription.custom_table.enforce_entitlement system property. For details on making this change, see Allow or restrict access to custom tables in mobile data items.Group by Groups query results based on the selected field from the menu. Table related to Table that the records in this data item are related to. For example, for a list of Task SLA records embedded into a task record screen, the Tables related tovalue would be the Task table. Relationship Relationship between the table selected in the Table field and the table selected in the Table related to field. Condition type Determines what type of condition your data item uses. Select from: - Declarative
- Use a declarative condition to create conditions for the data item using the condition builder.
- Scripted
- Use a script to determine the conditions of your data item. A text window to enter a script appears below this field when you select this option.
- Append Encoded Query
- Use this option only when creating data items for your chart screens. For details on that data item type, see Configure an encoded query data item for chart screens.
Condition Set of conditions for the data item to conform to. You can create conditions using the condition builder. 注:This field is only available when you selectDeclarativein the Condition type field.Sort by Lets you adds fields to the form that allow you to configure how to sort the list. In the condition builder, select the field you want the list to be sorted by. For example, select Caller. Then select ascending or descending to determine the order of the list. 注:This field is only available when you selectDeclarativein the Condition type field.Parameters 注:The Parameters field must not be used for relationship data items. - オプション:
If you have selected Scripted in the
Condition type field, you must create a script in the
Query Condition Script field.
Your scripted condition must return a query string, which the instance uses to filter the data item. Use the
inputvariable to access information from the current record.(function getQueryString(input) { var queryString = ''; if(input.company) { queryString += "company="+input.company; } if(input.location) { queryString += "^location="+input.location; } queryString += "^EQ^ORDERBYDESCsys_updated_on"; return queryString; })(input);This example uses the
inputvariable and filters the data item for records matching the current records company and location. It then appends the text^EQ^ORDERBYDESCsys_updated_onto the query, which sorts the data item records by the Updated on field.注:Theinputvariable provides mobile scripts access to values that are passed in the SubmittedForm or the ParameterData objects. - Select Save.
次のタスク
After creating a relationship data item, create a list screen using this newly created data item. For more information, see List screen configuration.