You are here:
Show Data in a Table on a Flexcard
At times, a sortable table is most suited to represent your data. You can show data retrieved from a data source in a table on Flexcards. For example, show account cases as a sortable table.
- From the App Launcher, find and select Flexcards.
- Expand a Flexcard and select a version.
- If needed, deactivate the Flexcard for editing the Flexcard.
- Drag the data table element from the element panel to the canvas.
-
Configure the newly added table element:
- Add columns in the data table and enter information as needed in the window that appears.
-
To let users navigate between pages using numbered links in the page, set up
pagination properties by using the Page Size and Page Limit fields.
If the page size is not specified, all records are displayed in a single page. If the total number of pages in the data table is less than the page limit, all pages are shown in the navigation links.For example, if you set the page limit to 3, each page displays three numbered links at the bottom of the page. The first and last pages are always shown in the navigation links. Any remaining pages are shown as ellipsis.
-
To delete a record when a user sets a field value to false, enter a field
name in the Field Determining Row Deletion field. If
you're using the designer on a managed package, enter a field name in the
Row Delete Dependent Column field.
Make sure that delete row is enabled for the data table.For example, a table lists account cases and has a boolean record field
IsEscalated. WhenIsEscalatedis false, a user can delete the record. When the field is true, hide the trash icon to prevent users from deleting the record. - Enter the remaining information as needed.
You can't add a clickable field in a data table. As a workaround, select the User Selectable Row attribute, which triggers a rowclick event. Then, in the Flexcard, add an event listener that uses a merge field action that contains the row data. You do this by clicking Event Listener in the Setup tab of the Flexcard. The merge field must be in the
{action.result.X}format, where X is the fieldName from the data table. This action fetches data into the data table.
Review the events that users trigger when they interact with data table records. Each attribute that you set on the data table element when you create the Flexcard corresponds to an event.
| Event | Description | Checkbox in the Data Table Properties |
|---|---|---|
| delete | The user deletes a row. | Delete row Checkbox in designer for a managed package: Row Delete |
| rowclick | The user clicks a row. The rowclick event contains the record of the row on which the user clicks. |
— |
| selectrow | The user updates a row. The selectrow event contains data for the currently selected row. It doesn’t consider previously selected rows. To collect data for all selectrow events, set up event handling. |
Let users select rows Checkbox in designer for a managed package: User Selectable Row |
| update | The user updates table data. | Edit cells and Edit rows Checkbox in designer for a managed package: Cell Level Edit and Row Level Edit |

