Skip to main content

Create 2 Datasource tables

  1. Navigate to HSYCO Manager

  2. Click on "Project Editor"

  1. Click "New Project"

  1. Give it a name ("todolistdatasource2tables" for example) and click "Create"

  1. Go on the home page

  1. Click "add"

  1. Add a "Table"

  1. You can resize it by dragging the left corner around the page

  1. Go back to "edit" mode

  1. Change the "Edit Mode" of the table to "true"

  1. Change the "Data Mode" to "datasource"

  1. Change also the "Datasource ID" to "db_todolist1", which is our first database

13. Click "Auto Config Columns". This will auto config the column based on current Datasource

  1. Click "Yes"

  1. As you can see, we have our four attributes from the database already in the table

16. Change the "Hidden" field of the ID to "true". This field is auto generated so we don't have to add it manually

  1. Click on "date"

  1. Change the "Field Type" to "date"

  1. Change the "Format" to "date"

  1. Change the "Label" to "YYYY/MM/DD"

  1. Now click on "time"

  1. Change the "Field Type" to "time"

  1. Change the "Format" to "time"

  1. Change the "Label" to "HH:MM:SS"

  1. Now click on "info"

  1. Change the "Label" to "To Do"

  1. Click on "items"

  1. Change the "Type" to "button"

29. Check the "Dynamic" checkbox. If this is set to true, the cell value can change the columns attribute dynamically

  1. Set the "Widht" to 40 to give the button a better appearance

  1. Change its "Action" to "command"

32. Change the "Command Name" to "showtodolist2". If you change this name, remember to change it also in the code, as explained later

  1. Click on "Add"

  1. Add the "Edit Button"

  1. Click "Add"

  1. Add the "Delete Button"

  1. Click on "ok" to save changes

Tip: Now we will add another page with the second table

  1. Click "Add Page"

  1. Add a "Page (landscape)"

  1. Click "add"

  1. Add a "Table"

  1. Resize it

  1. Go back to "edit" mode

  1. Change the "Edit Mode" to "true"

  1. Change the "Datamode" to "datasource"

  1. Change also the "Datasource ID" to "db_todolist2"

  1. Click "Auto Config Columns"

  1. Confirm by clicking "Yes"

  1. Click "3 Items..." under the "Columns" tab to modify the table's columns

50. Change the "Hidden" field of the "id" to "true". This value is autogenerated like in the other table so we need to hide it

  1. Select the field "id_nested"

52. Tick the "DataSource" option. This means that the cell's value is taken from the linked datasource's column specified in the "Label Data Name"

  1. Change the "DataSource ID" to "db_todolist1", so that the value is taken from the first database (linked to the first table)

54. Change the "Label Data Name" to "info". "info" is the name of the attribute specified in the database and is, in the other table, the last column where there is the text area

  1. Change the "Label" to "To Do (Nested)"

  1. Select the "info" field

  1. Change the "Label" to "Activity"

  1. Click "Add"

  1. Click "Edit Button"

  1. Click on "Add"

  1. Click "Delete Button"

  1. Click "Ok"

  1. Click "add"

  1. Add a "Button"

65. Move the button under the table. You can also use "Align" to align it horizontally or vertically

  1. Click "edit"

  1. Change the "Label" to "Home Page"

68. Change the "Action" to "link". This button is linked to the home page to navigate between these two pages

  1. Change the "Link" to "home"

  1. Now go back to "home" page and select it

  1. Click "add"

  1. Add a "Button"

  1. Move this button, like the previous one, under the table and align it.

  1. Go back to "edit" mode

  1. Change the "Label" to "Page 2"

  1. Change the "Action" to "link"

  1. Change the "Link" to "page2", which is the standard name of the second page

  1. Click "add"

  1. Add another "Button"

Tip: This button will be used to clear all the records in the two tables

  1. Align the button (like in the lower right corner) and go back to "edit" view

  1. Change the "Label" to "Clear DB"

  1. Click this icon to change the icon of the button

  1. Click the "Filter" field and search for "delete"

  1. Select an icon and confirm by clicking "ok"

85. Change the "Action" to "command". When pressed, this button will send a command that we will capture in our code to delete all records in the databases

  1. Set the "Name" to "cleardb"

  1. Set also the "Parameter" to "cleardb"

  1. Click "Save" to save the project