Making a Card Container
Overview
Card Containers organise and display information, such asĀ text, images and buttons,Ā in a visually appealing and structured way. They work in a similar way to grids but offer greater visual flexibility.
Card containers are backed by a table and this is used to display the data using data backed components, such as form fields and dynamic text.
Card Containers do not require Views to present data. If a Card Containers already contains a View, once it has been removed, it cannot be reapplied.
How-to add a Card Container to a Screen
To prepare your screen we recommend adding a tile to hold the card container.
- In the Serene Grey palette, expand the Card Containers section
- Drag theĀ BasicĀ card container onto your screen in the desired location and give it a
Name
- To set where the card container will get its information from, it must be backed by aĀ Ā Table,Ā this then allows the Ā AttributesĀ from the table to be displayed
- Click on the card container on the canvas to openĀ itsĀ Ā Properties tabĀ on the right
- Or click on the card container in the LayersĀ section
- In the Properties tab, under Basic Settings, click Table, next to the Table drop-down box
- Drag aĀ table from the RepositoryĀ into the TableĀ drop-down box, as illustrated below
- Ā
- ClickĀ Apply
- The card container now has access to all the data in the table
If you want to style your card containers and organise your information in a specific way then can use Areas to control the layout and add your Ā AttributesĀ into these areas. SeeĀ Screen Structure. We will also cover a styled example later on this page.
Display All Records
While inĀ Ā DesignĀ ModeĀ only one card will be shown in the card container. When the screen is Ā LockedĀ or in Application Mode, all records will be displayed.
Displaying Data in a Card
This is achieved by adding data backed components, such as form fields and dynamic text, and setting the attribute data they will display. When dragging attributes onto a card, they are displayed as dynamic text by default and the backing attribute is automatically set.
Adding Backing Attributes
- To display the table data, the dynamic text fields on the card need to be associated with attributes on the table - these are called Backing Attributes
- Right-click on card container on the canvas and selectĀ Ā Ā Add Attributes to componentĀ
- In the Available Attributes selector that opens, drag the attribute(s) you wish to display onto the card container
- You can also add attributes viaĀ theĀ LayersĀ byĀ adding form fields or dynamic text from the palette and then right-clicking the field and selectingĀ Ā Add Backing Attribute
- Or, you can right-click on card containerĀ and selectĀ Show the Table Configuration, then drag attributes onto the card container
- The attributes will appear as Dynamic Text - use the Styles tabĀ to change the appearance of the text, or seeĀ Changing or Creating a Palette
- If you want to change the Dynamic Text to a different palette item, right-click on it and selectĀ Change Template
Changing Backing Attributes (Optional)
- If required, the backing attributes can be changed
- Right-click on the component and selectĀ Ā Change Backing Attribute
- You can also do thisĀ in the Properties tab, underĀ Backing Attribute,Ā next to theĀ Table Attribute field, select theĀ Ā Change Backing AttributeĀ button
The Relational Attribute toggle indicates if the attribute is relational. SeeĀ Using Relational Views.
3. In the Available Attributes selector, either tick the attribute and select Add, or drag the attribute across into the Table Attribute field in the Properties tabĀ
a.Ā
Components display in the Ā LayersĀ and Ā Properties tabĀ with aĀ Ā icon to indicate the field is backed by an attribute, or aĀ Ā icon to indicate the field is not backed by an attribute.Ā Ā
Linking Views to Filter Results
Card containers can be linked with other types of Views, using background filters, to dynamically changeĀ the information displayed on the card containerĀ depending on the records selected in the other View.Ā
For example, on a screen with a grid of Companies and a card container of Employees, linking the content will ensure that only employees show on the card container that are associated with the selected company in the grid. SeeĀ 6. Linking Content on a Screen.
Using a Card Container Template - Contacts
In this example, we will add a Contacts Card ContainerĀ template from the Palette to a screen that will display employee contact information.
- In the Serene Grey palette, expand the Card Containers section
- Drag theĀ ContactsĀ card container onto your screen in the desired location and give it a
Name
- Click on the card container to openĀ its Properties tabĀ on the right
- Or click on the card container in the LayersĀ section on the left
- To display the attributes from a Table, in the Properties tab, under Basic Settings, click Table, next to the Table drop down box
- Drag aĀ table from the RepositoryĀ into the TableĀ drop-down box as illustrated belowĀ
- ClickĀ Apply
- Add backing attributes by right-clicking on theĀ First NameĀ dynamic text field and selectingĀ Ā Add Backing Attribute
- In the Available Attributes selector that opens, tick
first_name
and click theĀ AddĀ button- Ā
- The field will now display this dataĀ on the screen
- Repeat these steps for theĀ LastNameĀ and Role dynamic text fields
The Contacts Card Container contains three buttons, which can haveĀ actions configured to perform specific activities, such as calling a phone number or sending an email. These rely on the hidden fields for email, telephoneĀ and mobile being backed by data, search Hidden in the layer section and back these attributesĀ with the appropriate fields.Ā
The following Card Containers can be found in the Serene Grey palette. Basic A standard card container with no styling that displays the content of each row of data on a backing table. Content is displayed by adding fields or dynamic text to a card. Contacts A card container with icon and button styling that displays the content of each row of data on a backing table. Content is displayed by adding fields or dynamic text to a card. Buttons can be configured to perform actions, such as calling a phone number or creating a new email. A card container with button styling, displaying data from another table. A card container that shows one card, displaying data from another table. A card container that shows one card with an expandable area. A card container that displays an aggregate view to group repeated values to display as a list. Users can then select records to filter an existing grid or card component. A card container that displays a counter that can generate a total. It provides a circular card component that can be used to display a numeric value. This component requires a backing aggregate view that returns a single value in an attribute called "Count". As above. Includes a label field. A card container that displays a counter that can generate 3 totals, with label fields. It provides 3 circular counters in a single card component that can be used to display numeric values. This component requires a backing aggregate view that returns three total values. By default these are called "Count" but the names will need to be changed to display the values shown in the backing view. A card container that displays a basic Kanban board, designed to display the statuses of different tasks. As above. Includes styling to display the cards as yellow sticky notes.Card Containers in Serene Grey
Card Type Icon Description Example Use Comment See 22. Exercises Read Only Expandable Use when there is extra data that does not require displaying. Filter List Add next to an existing grid or card component to filter its content. Filter can be applied to the existing grid or card component to filter the records by the selected card. Counter Labelled Counter Triple Counter Kanban Board 1 Kanban Board 2
To see all of the features available in the Serene Grey palette, seeĀ Serene Grey Template Package.