In this example, the Timeline element will display data by connecting to a SQL Datasource.
1. Creating a Datasource
- Enter the Datasource module.
- Create a new table and define the following variables:
- title (String): Title of the event
- description (String): Description of the event
- color (String): Color code to be used for each event
- Create the table by clicking the CREATE button.
2. Create SQL Action
- Click on the + icon in the Actions section in the left panel.
- Select New SQL Action.
- Create a new SQL Action by entering the following SQL command:
SELECT * FROM timeline_datasource
4. Complete the process by clicking the CREATE button.
3. Binding SQL Action to Timeline Element
- Select the Timeline element.
- Click the +Add Action button in the Properties panel on the right side.
- In the Search Box field, type the name of the SQL Action you created (for example, TimelineAll) and select the action.
- The selected action will be displayed in the Options field of the Timeline element.
- At this stage, match the data as follows:
- Title: title
- Description: description
- Color: color
Important Notes
- Using the Mode field you can set whether the Timeline is displayed right, left or alternately.
- The Timeline element will automatically update as the data is updated.
Once you have done this, your Timeline element will now work with the data you have specified.