How to Set Up a Data Table
You will need some knowledge of SQL server to set up a Data Table. Once it is set up and you start to build solution screens, Data Tables types work almost identically to a normal type. The difference between the types is how you manipulate the Elements. For example, deleting, editing, and creating new Elements.
- Install the licence
- Create a new Data Table type in Manage Themes that matches the name of your SQL table
- Add fields which match those on your SQL table
- Set an integer as the key field
- To create a relationship to a normal theme:
- Create a new Data Table Relationship in Connections that matches the name of a column in your SQL table
- Choose the target Type and ensure it has an integer or string key field
- Preview the Data Table
- Validate the repository to check it is consistent
- MooD 15: Click "Check"
- MooD 16: Click "Validate"
Setting up a data table is demonstrated in the short video clip below:
How to Create a Data Table Type
- Open Manage Themes
- Open the 'Data Tables' Theme
- Select "<New Data Table>" and name it with the same name as your database table
- For example, MooDDatabaseName.dbo.TableName
- Refer to the Data Locations section for information on where your data can be stored
- Add fields to the type which match the fields in your table e.g. whole number, fractional number, date time, string etc.
- The name and type of the fields must directly relate to the name and type of the fields on your SQL table
- Set a whole number field as the key. The 'keyed' values will be the ‘names’ or identifiers of your Data Elements.
- The key on a Data Table must be an integer
- The values in the whole number key must all be positive
Creating a data table type is demonstrated in the short video clip below:
Comments
0 comments
Please sign in to leave a comment.