Get a detail view of a single record. The detail component lets you display data in a readable format. It's a common component for lookup tools and can also be bound to other components.
Since this component only displays one record, detail views are usually bound to a different component, like a table, that will determine which record is displayed in the detail view. Sometimes a detail component is bound to a filter component.
Components like a form, pop-up form, button or dynamic button can use the data in a detail component (from the current record shown) as inputs to their functions. A detail component can also influence what is shown in tables, card lists and other detail views through filters.
First, select the resource whose data this detail component should show.
Set filters to specify which record is shown in this detail component. Generally, the criteria should identify a single record. Click “+ Add filter” to add your first filter.
Each filter has a data field which is compared to a value. A preset filter compares against a fixed value, whereas a dynamic filter compares against data from another component. Dynamic filters are usually used with a detail component, as preset filters will show the same record in the detail view, which is not usually useful for a tool. In most cases, the easiest way to specify a single record is with a dynamic filter on the primary key.
Let's go through an 2-step example where we'll first bind a detail component to a filter component, and then bind a detail component to another detail component.
Let's say we're an on-demand company and we have a resource called Rides which has our rides data. We want to create a lookup tool that will show a single ride's data, and also show the associated rider.
First, we'll add a filter component called RideInput - this is where the user will enter in the id value for the ride they want to lookup.
Next, we'll add in a detail component to display the Rides data. In the filters tab, we'll bind this component to the filter component, matching the id field from the Rides resource with what is input into the filter component:
We also want to show the rider that took this ride, so we add another detail component to display the Riders resource. In the filters tab, we'll bind this component to the first detail component (showing Rides), matching the id field from the Riders resource with the Rider id from the Rides detail view:
Now these three components are bound together, so that when you enter in a ride id in to the filter component, you'll see the ride and rider details populate in the components below.
You can also bind a detail view to a table or card list. When a user selects a row in the table, the detail view will change.
Here, you can add, remove and rearrange fields within this detail component. You can edit the display of these fields to add icons and pillboxes to your detail component.
If you don't want a user to see a data field, but still want to use its data in other components, remove the column and add it back as a hidden field.This means the column won’t be displayed in the table, but you can still use the data in the column as inputs for another component.