Saving TenDo results to a file

Use the -o switch to save TenDo results to a file.

To save your results to a .csv file, TenDo provides the -o switch. Simply add -o to your TenDo command, followed by a space and the location of the file where you want to save your results. The -o switch can be placed anywhere in your TenDo command except between the [TABLE] and the [QUERY]. However, the examples in this guide show all output options at the end of commands for syntactical (as well as logical) consistency. Here's an example of the syntax for saving results in a file:
$ tendo -u [USERNAME] [TABLE] @[QUERY] -o [FILEPATH]
If you only provide TenDo with a file name, the output file will be saved in your current working directory. However, the best solution is to provide a complete file path where you want to save the file, as follows:
$ tendo -u [USERNAME] [TABLE] @[QUERY] -o ~/Downloads/tendoResults.csv
$ tendo -u [USERNAME] [TABLE] @[QUERY] -o C:\Users\TLin\Downloads\tendoResults.csv
TenDo returns all data as UTF-8 encoded characters.
Note: UTF-8 is a standard character set that is used as a standard for computer interactions that require characters. TenDo only returns data encoded in UTF-8.

When you specify a file name, TenDo will simply create the file for you if it doesn't exist. If it does exist, TenDo will overwrite the existing file with the new output. If you don't have permission to create a file in the specified location, TenDo will return an error.

Specifying How Much Data is Returned

TenDo provides functionality to control how many rows of data are returned from your query results, as well as where the rows returned begin. The -n switch specifies the number of rows that are returned from your query results. The -n switch does not apply to data sets that are rendered from a QuickApp.

The -i switch controls the row at which the returned results begin. 1010data refers to this as the "offset." These options can be used individually or in unison to further specify the result output.

The following command returns the first 10 rows of your query results and saves them to the specified file. If there are fewer than 10 rows of results, all results will be returned:
$ tendo -u [USERNAME] [TABLE] @[QUERY] -o [FILEPATH] -n 10

The following command returns the 11th row of the table and all following rows:

$ tendo -u [USERNAME] [TABLE] @[QUERY] -o [FILEPATH] -i 11

Finally, the following command returns a maximum of 10 rows of results, starting with the 11th row:

$ tendo -u [USERNAME] [TABLE] @[QUERY] -o [FILEPATH] -n 10 -i 11