In this article
When you first create a table it will be empty and you will need to add the desired contents. In addition, existing tables can also be edited. You can add further columns to the table via the Add Columns tab, and add the contents via the Contents tab.
In the Contents tab you can enter fields one by one, copy data from files and paste it into the table, or you can upload the data as a file.
Note: Any language-sensitive texts that you add to the tables in Database Designer can have a maximum of 2048 characters.
To delete a row from the table, click in the box to the left of the row to select it, then click Delete.
Note: The Contents tab has search fields above the columns. In the event you have a large number of rows in the table and you wish to edit a particular row, use these search fields to reduce the number of rows displayed.
Uploading the Table Contents
If you have a long list that you wish to add to a table and that list is available as a file, you may wish to upload the list instead of copying and pasting the data or entering the items individually via the interface. You can upload from a file, or pick up the file from the FTP site if you have the appropriate license. You can also schedule the task for a later time, and make the task recurring so that the table can be updated automatically.
Important:
The file to be uploaded must be in tab-delimited text format (created for example via “Save as” or “Export” in applications such as MS Excel®). This text file may also be zipped and uploaded as a .zip file.
Note: Any language-sensitive texts that you upload to the tables in Database Designer can have a maximum of 2048 characters.
- In the schema window, go to the Tables tab and click the Table ID for the desired table.
- Go to the Contents tab and click the Upload from file button - , as shown below.
- Select the type of upload you wish to perform.
- Upload file - if you wish to upload the source file from your server network (perhaps the file has been stored there after having been sent to you via email), then select this option and click Browse. A standard browser window opens, in which you can search for and select the file you wish to upload.
- Pick up from FTP location - if your company has licensed the FTP add-on and it has been enabled, this option will be active. You can then fetch the file to be uploaded, from Forsta Plus' FTP location. Forsta Plus' FTP address is specified as part of the enabling procedure and cannot be changed. The file should be placed in .../upload/tablecontent/.... Note that fetching from FTP can allow automation of data flows, since files can then be picked up automatically.
- File handling - if you have selected Pick up from FTP, select whether you wish to copy the file from the FTP site (leaving the file there for future use) or move it (delete it from the site).
- Set the Start Time for the task, and set up the recurrence properties if required.
- Select the desired Upload Behaviour.
- Append/Update - merges any content that already exists in the table with the content of the file, based on the id field. If a code in the id column is already in the table, its texts will be replaced with the texts from the file. If the code is not already in the table, a new row will be added with that code and its texts.
- Overwrite - removes all the current content and replaces it with the contents of the file.
- Check the Automatic Synchronize After Upload box if you wish to perform that process automatically.
- Click OK.
The table details page opens below the table.
Figure 1 - Uploading a list
The Upload Table Content overlay opens - .
Figure 2 - The Upload Table Content overlay
A task will be queued on the batch server. When the task is executed, the content of the file will be inserted into the table in the manner specified.
Upload File Format
The file to be uploaded must be in tab-delimited text format, created for example via “Save as” or “Export” in applications such as MS Excel®. This text file may also be zipped and uploaded as a .zip file.
Columns that are not language-dependant will be allocated the default language, set on the Properties tab (go to Table Properties for more information).
Note: The language codes must be preceded by two underscore characters.
The first column header must always be the id (the identifying code for the table item). This will be followed by the remaining columns. Where columns are language-dependant, there must be a column for each language selected in the properties tab. The column headers for these columns must be two underscore characters followed by the language code for the language to be used. For example, if a file is to be uploaded to a table that has two languages selected; English and Norwegian, then the first column header will be id, the second column will be __l9 (the language code for English), and the third column header will be __l20 (the language code for Norwegian). If a relationship is specified, then this will be the final column. See the table below:
Column header |
Description |
id |
The primary key field with the unique code for each item. |
__l+<language code> (for example __l9 for English, __l20 for Norwegian etc.). |
One or more columns (depending on the number of languages) with the answer texts. |
<relationship field(s)> (for example r1). |
For each relation the table is used in, you must include the name of the relation (as set up in relations), for example r1 in the “continent-countries” example. |
Note: Columns that are not language-dependent must still include the language code for the default language. For example, a column for email addresses "email" where the default language was English would have the header "__l9email".
The contents of the “Continents” table could have been uploaded from a file as - :
Figure 3 - Example of a Continents file
The contents of a “Countries” table could be uploaded from a file such as the extract shown below - :
Figure 4 - Example of a Countries file
Adding Data to the Table
To add the rows individually to the table:
- Go to the Contents tab and click Add to insert a new row in the table - .
- Fill in the details as required for the row.
- Repeat the procedure until the table is complete.
- When you have completed the changes click Save.
Figure 5 - Adding content to the table
Note: Any language-sensitive texts that you add to the tables in Database Designer can have a maximum of 2048 characters.
The Number of rows is updated, and the ID codes are locked (they turn red) - .
Figure 6 - The completed and saved table
Copying and Pasting Data into a Table
If you have the data columns in the required order in an Excel or tab-separated file, you can copy and paste the entire list into an Authoring table. To copy/paste data from a file:
- In the source file, select and copy the desired columns and rows.
- In the destination table, click Add to add a row, then click into the field into which you want the first column of copied data to be pasted.
- Paste the copied data.
- On completion, click Save to save the changes.
Additional rows will be added to the table as required to provide space for the rows you are pasting.
Note that if you copy more columns of data from the source file than exist in the destination table, then "excess" columns will be ignored and the data from those columns will not be added to the table. If you copy fewer columns from the source file than exist in the destination table, then the "unused" columns in the table will remain empty.
You can copy columns of texts from separate Excel files, into separate columns in the table. This would allow you for example to add columns of texts translated by different translators for the languages selected for the table.
Note: Any language-sensitive texts that you paste into the tables in Database Designer can have a maximum of 2048 characters.
Adding a Column
Note: It is not possible to change the name or length of existing columns in a table once that table has content. In this event an information message will be displayed and the data fields will be grayed out.
Also, you must have Administrate Schema permission for the database, otherwise the Add Column button will not be available.
The Additional Columns functionality allows you to put additional information into a Database Designer table. So if you have for example a hierarchy with regions and clients, you can not only put the clients into regional groups, but you can also store their email, phone number, and title in additional columns. Some columns will be language-dependent, for example Title (Mister, Señor, Monsieur), and some will not (email is email irrespective of the language).
These fields can be used within the survey to extract additional information. That is, within a survey using a Database Designer table hierarchy, you could automatically send an email to the appropriate client because it is stored in the additional column with the proper greeting (Mister Client1 vs Señor Client1 etc.).
Note: A maximum of 100 columns can be added to a table, and the column width of each additional column can be a maximum of 128.
To add additional columns to a table:
- In the Tables tab, click the blue Table ID link for the table to which you wish to add a column.
- In the lower area, go to the Additional Columns tab.
- Click Add Column - .
- Type the name for your new column into the field.
- Add the desired column width.
- Select whether or not the new column is to be language independent.
- Click Save to save the changes.
Figure 7 - Adding a column to the table
A row is added to the tab - .
Figure 8 - Tab with additional row
Note: This will be the column name that will appear in the table and be visible to the user.
Column Width defines how many spaces in the database the column will hold. So, for example you could set the "email" column width to 70 so it will accept even long email addresses. Note that you must supply a value or you will not be able to save the changes.
If the column is to be language-dependent, a column will be added (visible in the Contents tab) for each language that is selected for the table in the Properties tab (go to Table Properties for more information). If the column is independent of the language, then only one column will be added, for the default language.
The new column is added to the table. Go to the Contents tab to see the columns - .
Figure 9 - A column is added for each language selected for the table
Captions
The table will need a caption in each language selected in the Properties tab. Go to the Captions tab (- ) to specify the table names in the various languages; a row is displayed for each language. In each row, the Caption field will initially display the Table name in the default language. Click on a name in the list to modify it, and on completion click Save. The figure below shows the "Continents" table name being translated to Norwegian.
Figure 10 - Example of the Captions tab