Skip to Content
Data Plus TableExamplesStart Stop Buttons

Start/Stop buttons v1.34.0


This example showcases how the Data+ Table can be setup to look like simple buttons, with no table design visible. Clicking the start button will save the start time and change the status. Which means that we will require a db table with two columns status and start_time.

  • Let’s start by setting up a table with one row, two buttons and two text (no input) fields:

  • Hide the dimension and change the buttons design:

  • Enable save on entry so that clicking a button will save data immediately.

  • Next we create some rules to actually set the status and start time:
    When we press the start button, we want to set the status to running and the start_time to the current time.

    Same goes for the stop button, we want to set the status to stopped and clear the start_time.

    Lastly we want the start button not to be clickable while it is running, so we disable the column. Same goes for the stop button.

This will give us working buttons. Let’s try it out:

  • It still looks like a table though, so we are going to change the appearance next:
    1. Change the size

    2. Disable Qliks default object background and remove all borders

    3. Hide the info bar

    4. Hide the table header

    5. General appearance settings

The result:

  • For the last step, we do not want the status and start_time in separate columns.
    Since these columns are Data+ columns though, we cannot simply combine them in the column settings as one might do with two dimensions. We will have to create a rule for that:

=If('$(status)'='running','$(status) since $(start_time)','$(status)')

This rule will overwrite the text in column status. The value is calculated with an Qlik expression using the values of the statusand start_time columns.
Please note:
Our table has only one row and uses no dimensions that will be affected by selections, therefore the rule will not have any impact on performance. Otherwise it is not recommended to use a Qlik expression value in combination with has value triggers.
Result:

  • Finally let’s hide the start_time column and adjust the start column:

Leaving us with:

Last updated on