Skip to main content

Use datasets in your application

You can use datasets to populate picklists, display data on pages and views, and identify cases on which to perform activities. You control which users can see the items in a dataset by granting rights to the activity or widget as appropriate.

Picklists of cases

You can use datasets of cases to populate picklists. You can then use the picklist to provide options for an attribute or bare form field.

For example, you might want to create a picklist that lists all the services that you offer so that when users create a new Booking case, they can populate the Service requested attribute by selecting from the available services. You could create the picklist using the default Cases - Service dataset that lists all Service cases. This ensures that each time a new Service case is added to your application, the picklist is updated automatically.

Similarly, when creating a User management page, you might create a picklist using the default Cases - User dataset. You can then add the Users picklist to multivalue attributes on the page casetype so that you can add users to platform roles by selecting from a list of existing users.

Tip:

The data type of the attribute(s) that uses the picklist must be Case ID, as the attribute will record the case ID of the selected case.

Use multivalue attributes in a picklist

You can also create a picklist based on a dataset that identifies the cases that have been added to a multivalue attribute.

For example, you might want to allow users to select a Reference provider when submitting an internal job application, but restrict them to choosing users that are in the Manager role. You can create a dataset of users in the role by using the Manager role multivalue attribute from the User management page casetype (or another page that you use to add users platform roles). You can then create a picklist based on the dataset and associate it with the Reference provider attribute.

Filter picklist items to the current case

To restrict a picklist to cases that are related to the current case, ensure the dataset includes a condition that displays only those items with a case ID attribute that matches the current case.

For example, when creating a new Complaint case, you might only want to list the Claim cases that were opened by the current Customer case so that the user can select the claims that are relevant to the complaint.

You can achieve this by creating a filtered dataset based on the default Cases - Claim dataset and adding a condition that compares the Customer column (which contains the case ID of the related Customer case) to the current case. You can then create a picklist based on that dataset and use it when creating a new Complaint case from a Customer case. When a user creates a new complaint, only the current customer's claims are listed in the picklist on the Start complaint form.

For more information about adding conditions, see Use conditions to filter a dataset.

Display data on pages and views

You can use grid, tile, and template widgets to display data from datasets on pages and views.

For example, you might want to list all existing application users on a User management page. You can use the default Cases - User dataset to populate a grid widget. When you configure the grid, you can choose which columns from the dataset to display, and rename or reorder the columns as required. You can also add activities from the User casetype, such as editing or closing users, to the grid as inline options.

Similarly, you might want to display details of Product cases on your application homepage. You can use a filtered dataset that identifies in stock products to populate a tile widget. You can also add a form search widget linked to the same dataset to allow users to further filter the products by attributes such as Price or Manufacturer.

To display the results from an aggregation dataset in a custom format - such as in a chart, map or infographic - use a template widget. For example, you might want to display a count of customers per account manager in a chart or show the average order value per region on a map.

For more information about displaying content to users, including how to configure widgets and permissions, see Configure pages and views.

Display cases or tasks relating to the current case

You can restrict the items displayed in a widget to those relating to the case currently being viewed. For example, on a view of the Customer casetype, you might want to include a grid or tile widget to display details of the customer's open Order cases. Similarly, you might want to use a template widget to display a button for each optional task that can be performed on the current Customer case.

For datasets containing cases, add a condition to display only those items with a case ID attribute that matches the current case. For example, you might create a filtered dataset based on the Cases - Order dataset with a condition that compares the values in the Customer column to the current case. For more information, see Use conditions to filter a dataset.

To display a list of tasks, use the appropriate default task dataset, such as Optional tasks on current case. You can also use the Required tasks on platform dataset to display all mandatory tasks in your application.

Iterate through cases in an activity

You can use a dataset to identify cases to iterate through as part of a For each loop on an activity. You can use a dataset based on cases or a multivalue attribute (containing case IDs) for this purpose. For more information, see Apply conditional logic to activities.