In Table Grid Next Generation a column can be one of many types. This When creating one Table Grid, in the menu Grids from the App, you have different types for the columns you want to create. These types are defined while creating the table and will not have any impact while exporting data. However, since Xporter does not know the type of each of the fields retrieved from Table Grid Next Generations, in some cases, additional formatting might be needed. The following table has the list of types supported in this integration and the expected exported output.
Column Type | Description | Template Output | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
String | Returns a single line of text | Text | ||||||||
Number | Returns a number with a decimal | Number | ||||||||
Integer | Returns an integer number | Whole Number | ||||||||
Date* | Returns date in epoch time | Date (in epoch time) | ||||||||
DateTime* | Returns date and time in epoch time | Data and Time (in epoch time) | ||||||||
Time* | Returns time in epoch time | Time (in epoch time) | ||||||||
Single Select List | Returns the unique selected option value | Selected Option Value | ||||||||
Multi Select List | Returns all selected option values separated by comma | Selected Option Values (separated by comma) | ||||||||
Checkbox* | Returns a boolean, True or False | True or False | ||||||||
Userlist | Returns the username of the selected user | Selected Users' Username | ||||||||
Formula | Returns the result of the formula specified in the column configuration | Formulas' Result | ||||||||
Sequence | Returns the order from the rows in the table | Order | ||||||||
Textarea | Returns a plain text, including paragraphs | Text | ||||||||
Attachment* | Returns the URL of the attachment | Attachment Download URL |
Of the previously mentioned type, the following types The types with * might need some extra effort in other to accurately display what formats in the template, in order to accurately export what they are actually supposed to represent.
DateTime
While exporting a column which type is DateTime the time in seconds (epoch time) will be exported. To get the actual date from this we can use the following script:
Code Block | ||||
---|---|---|---|---|
| ||||
// Replace the TABLE_NAME with the Table Grids' name and DATETIME_COLUMN with the column id.
DateTime: %{var date = new Date(${TableGrid.TABLE_NAME[n].DATETIME_COLUMN}); date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() + ' ' + (date.getHours() - 1) + ':' + date.getMinutes()}
|
Date
The Table Grids type Date will, once again, export the time in seconds, but this time without the time component. We can format the retrieved value by using a script like the one represented in the following example:
Code Block | ||||
---|---|---|---|---|
| ||||
// Replace the TABLE_NAME with the Table Grids' name and DATE_COLUMN with the column id.
Date: %{var date = new Date(${TableGrid.TABLE_NAME[n].DATE_COLUMN}); date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()}
|
Time
The Time type will return the time as the number of seconds since January 1st 1970 (the epoch time). We can format the retrieved value by using a script like the one represented in the following example:
Code Block | ||||
---|---|---|---|---|
| ||||
// Replace the TABLE_NAME with the Table Grids' name and TIME_COLUMN with the column id.
Time: %{let date = new Date(${TableGrid.TABLE_NAME[n].TIME_COLUMN}); (date.getHours() - 1) + ':'+ date.getMinutes()}
|
Boolean
The Boolean type will retrieve only 2 simple values, true or false. We can format the retrieved value by using a script like the one represented in the following example:
Code Block | ||||
---|---|---|---|---|
| ||||
// Replace the TABLE_NAME with the Table Grids' name and Boolean_COLUMN with the column id.
Boolean: %{${TableGrid.TABLE_NAME[n].BOOLEAN_COLUMN} ? 'Checked' : 'Not Checked' }
|
Other Types
You can find the help to use formats on this page.
Info | ||||||||
---|---|---|---|---|---|---|---|---|
|
Example
When you click to add a Grid, some column types are created by default, and with default names, such as:
- Order: column of type Sequence;
- Summary: column of type String;
- Assignee: column of type Userlist;
- Status: column of type Single Select List.
You can see an example of the default columns and the new one created in the image below.
Note | ||
---|---|---|
| ||
The field "Identifier", you can see in the image below, is the one you need to use while creating a column. This identifier can also be verified in the list of columns present in the Table Grid between parenthesis. In order to help to create a template, you can find a guide on this page. |
The other types contained in Table Grid Next Generation are automatically formated, or already formated once retrieved, by Xporter. No further formating is needed, but, if desired, you can still format your data by using the script tags and JavaScript.