Skip to main content

Create a Table with Columns and Buttons

  1. Navigate to HSYCO Manager

  2. Click on "Project Editor"

  1. Click on "New Project"

  1. Name it (tabletimelights for example)

  1. Click here to access the home page

  1. Click on "add"

  1. Click on "Table" to add a table to the current page of the project

  1. Go back to "edit" mode

  1. Click on "not set..." under the "Columns" tab to add some columns to the table

  1. Here we can add a column, an edit button, a delete button and other useful objects

  2. We will create a 5-column table containing: a Name that can easily distinguish a light, a Status (On/Off), a Light Up Time representing the number of Hours a light has been On, a hidden datapoint field that stores the datapoint of the light and a button to turn On and Off that light

  3. Click "add"

  1. We'll start by adding a "Column"

  1. Click on the "Label" input field under the "Column Header" to give it a name. This will be the Header of the Column

  1. Type "Name"

  2. Now we'll make this text required by changing the "Required" field from "auto" to "true". In this way the user has to obligatory input this value

  1. Click on "add"

  1. Select "Column"

  1. Change the "Label" by tiping "Status"

  1. Make this field not required by changing the "Required" field to "false" as we will set a default value later on

  1. Click on "Default value" and type "Off". This will automatically set this value to "Off" every time we insert a new row in our table

  1. Now we'll set the "Disable Field" to "both" as we don't want the user to be able to modify this value neither in view nor edit mode.

  1. Click on "add" and then "Column"

  1. Change the "Label" to "Light Up Time (Hours)"

  1. As we did before, make this value not required by changing the "Required" field to "false"

  1. Now set the "Default Value" to "0:00"

  1. Again, disable this field in "both" view and edit modes

  1. Now we'll create a column that will be invisible in viewmode but will contain the link to the datapoint of the light so that we can use it to turn it on and off later

  2. Click on "add" and add a "Column"

  1. Change the "Label" to "Datapoint"

  1. Make this filed required setting it to "true"

  1. Now go deep in the setting to find the "Hidden" field and set this to "viewmode". By doing so, the column will be invisible in viewmode but visible in editmode

  1. Click "add" and add a "Column"

  1. Change the "Label" to "On/Off"

  1. Now change the "Type" of the column from "text" to "button"

  1. Click the "Width" field and type 200 to give the button a bigger appareance

  1. Now we'll set the command that the button will send when pressed. Change the "Action" to command

  1. Type a "Command name" like "tabletimelights.light"

  1. Now we'll set the icon that will be on the button to give it a better appareance. Click on the little button on the left of the "Button Icon" field

  1. Click the "Filter" field and type light

  1. Select an image

  1. Click "ok"

  1. Click "add"

  1. Click on "add" and add an "Edit Button"

  1. Do the same with the "Delete Button"

  1. Click "ok" to save the actual configuration

  1. Now we'll set some options to our table

  2. Change the ID to "tabletimelightsdata"

  1. As you can see, the "Command Name" field, if empty, is the same as the ID. This is the command that the table will launch when we add a row

  1. Click the "Edit Mode" field and change that to "toggle". By doing this the add button and the confirm button show up on the right hand-side of the table

  1. Click "Save"