I will explain the download function in detail.

Repeat item

A number is added after the item name for the number of data. Specifically, it is item name [1], item name [2]//////.

Figure 1 Example of downloaded CSV file (1)

Repeat container

A number is added after the item name for the number of data. Container name [1]/item name, container name [2]/item name// /.

Figure 2 Example of downloaded CSV file (2)

Model reference (list box, radio button, search screen)

Item'sContent sectionIs displayed.(Blue frame in the above figure 1) If there is no registration, the data part will be output as blank.

Model reference (check box)

Reference content is output after the defined item name.On the second and subsequent lines, "1" is output to the selected content. If not selected, "0" is output.(Blue frame portion in the upper figure 2)

When the same item name is defined

To distinguish, "(" + item ID + ")" is output after Japanese item name.(Figure 3)

Figure 3 Example of downloaded CSV file (3)
By setting such that item names do not overlap, this operation can be suppressed.

In the model reference (check box), if the (item) whose item name matches the start part is defined

"(" + Item ID + ")" is output after the item name for distinction.(Figure 4)

Figure 4 Example of downloaded CSV file (4)

A model that specifies the group authority function

The model for which the group authority is set includes the item "jgroupidjshparam" to indicate "data owner".This item is required inside Wagby.

Restriction: Unmatched type

If the referring destination of the reference linked type item is repeated, and it is a check box, it is not supported.(It will not be output.)

Definition method

You can specify the page title and description.(FIG. 5)

Figure 5 Settings related to download screen

Example of operation

Figure 6 shows the screen generated with the settings in Figure 5.

Figure 6 Example of setting page title and description

I will explain the download setting in detail.

Figure 7 Settings related to the download function

Download file type

You can select "CSV (Comma Separated)", "TSV (Tab Separated)", "Excel (xls)", "Excel (xlsx)", "Runtime Specified".

Download file name

You can specify the name of the file to be downloaded arbitrarily.Detail is"Design of Download File NamePlease read.

Character encoding of CSV file 7.10

You can specify the character encoding of the download file for each model.When this value is blank, "Environment> Application> Initial Parameter> Character Encoding of CSV FileThe value of "is used.

For example, if you want to output with UTF-8, write utf-8 in this column.

Use item name (English) for column name

When checked, the item name in the header section changes to the item ID.

Allow multiple simultaneous downloads

Allow multiple users to download at the same time.This setting is enabled by default.

Please note: Download processing temporarily consumes server memory.

Output an empty column when there is no reference authority

For items that do not have reference authority, the item name and data are not displayed.However, if you enable this setting, the item name will be output even if you do not have permission.Data is output with blanks.

Output check boxes in one column separated by delimiters

In checkbox type, "1" or "0" is output for data item.(Figure 3)
When this setting is enabled, data is output together as one.Use "," to separate delimiters between data.For example, "Government Offices, Others" output.

Separate check boxes with delimiter and output in one column - Delimiter

It is also possible to specify the delimiter of the above "Separate check boxes with delimiters and output in one column"."," (Comma) is used when blank.

Also download the primary key of the model reference item

For model reference items, the content part is output.When this setting is enabled, the primary key of the referenced model can also be output at the same time. The item of the primary key is "item name # id".

Column nick character

By default, double quotation marks are added before and after the column in the download file.When "(none)" is specified in this setting field, double quotes are not output.When this setting is not specified (standard) is double quotation.

If you specify "None" for the column name, do not include double quotation marks or commas in the data.If it is included, an interpretation error will occur on the side that received the CSV file.
It is also possible to upload and update a CSV file that does not have column collar characters.Also in this case do not include double quotes or commas in the data.

When blank

When the download file name is blank, the file name follows the following rule.

Logon Account _data _ Date Time. Extension

Fixed file

You can specify a fixed file name.Extension is not required.The file name is as follows.

Fixed file name. Extension


You can include search conditions as placeholders."Model name _ cp. Item name" will be obtained.Extension is not required. Here is an example.


You can mix placeholders and other characters.

$ {Report_cp.title} _ $ {report_cp.type} _ File


An expression (function) can not be included in the file name setting field.So I will do as follows.

  • Prepare hidden items as search conditions.
  • A file name is determined using an expression for the initial value (search time) of the item.
  • This item is used as a placeholder.

Setting Example

The sample model definition is shown in Figure 8.Item ID "csvfilename" is an item to store the name of the file to be downloaded.

Figure 8 Sample model to hold download filename

This item is not saved in the database.(Figure 9)

Fig. 9 Make database non-save

This item is hidden when entering.(FIG. 10)

Figure 10 Hidden items when entering

This item is also hidden when output.(FIG. 11)

Figure 11 Hidden items when output

This item is also hidden when searching.(FIG. 12)

Fig. 12 Make it hidden when searching

Specify an expression as an initial value at search time.This is the file name.(FIG. 13)

In the following example, if the name item in the search condition is empty, use the logon account name.Otherwise use the value of the name field entered in the search condition field.It adds the date in "yyyy-MM-dd" format.

Fig. 13 Setting of equation

In "Screen> Download> Download settings> Download file name", specify this hidden item.

Figure 14 Setting download file name

Include in download

You can individually specify whether to include each item for downloading.

Control "output to CSV" of "Model Item Detail Definition> Output Control> Others".It is enabled by standard.

Figure 15 Output setting of item

Sort by

The sort order of the output data follows the sort order specified in the repository.

If your model includes repeating items and repeating containers, you can download these data independently.

Figure 16 is a model that contains the repeat item "e-mail" and the repeating container item "negotiation history". You can select the content to be output in "download format" under the search condition.

Figure 16 Model Download Screen with Repeat Items

Figure 17 shows an example of downloading the repeat container "Opinion history" and opening it in Excel.

Figure 17 Example of Downloading Repeat Container "Opportunity History"

When "All" is downloaded, all repeating items and repeating container items are output together in one line.(FIGS. 1 and 2)
If you download repeating items and repeating container items separately, they are expanded for each line and output.(FIG. 17)

The file name naming convention is as follows.

Logon Account _data_Modelitem_ Repeating Item ID_ Date Time. Extension
Logon Account _data_Modelitem_ Recurring Container Item ID_ Date Time. Extension

You can not change the naming convention of file names.

Opening CSV and TSV files in Excel

The following problems may occur in environments where Excel starts when double-clicking CSV (comma separated values) or TSV (tab delimited) files.

  • 0 is missing with leading zero-padded digits.
  • If the content of an item as an arbitrary character string happens to be close to the format of the date, it will be automatically converted to the date type automatically.

The way to avoid this problem is as follows.

  • Right click on the file icon and specify "Microsoft Office Excel" from "Open with program".
  • Activate Excel in advance, drag and drop files you want to open.
  • Use "data capture" function provided by Excel.[To be described later]

Excel file

Type information is reflected in files downloaded in Excel format.

  • String types, numeric types, and date types are reflected in Excel cell types.
  • Numeric and date format format specifications are not reflected in Excel.(Because Wagby specification method and Excel specification method are not the same)
  • All model reference type items are treated as string type.
  • For reference linked type items, the reference type is reflected in Excel cell type.
When downloading in Excel format, temporarily consuming a lot of memory.Also, it may take a long time to create the data.Therefore, depending on the amount of data, the download process may fail.

When dealing with large amounts of data, please narrow down the data to be downloaded (by search).Please operate in place of CSV format, not Excel format.

Difference between. Xls and xlsx

Extension xls formatIf you select, you can handle data items up to 256 columns.(Parts exceeding 256 columns are ignored.)
The maximum number of data that can be handled is 65,536 lines.

Extension xlsx formatIf you select, you can handle data items up to 16,384 columns.
The maximum number of data that can be handled is 1,048,576 lines.

When the authority setting is made for the item, it operates as follows.

  • For the output of the item name, only the authority is the judgment material.The condition part is ignored even if conditional authority is set.
  • Output value judgment is judged according to the condition part.If there is no condition part and permissions are fixed, the specified authority is applied.

Notes on using with upload update

When downloading data of model with conditional viewing authority set in CSV format file, careful consideration is required for operation to edit and upload this data.

The following model definition is taken as an example.

item Description
idPrimary key
bSpecify conditional viewing authority.Only available when item a is "0"

We assume the following data.

Data 1: id: 1000 a: 0 b: aaa data 2: id: 1001 a: 1 b: bbb

If you log on with authorized account and download the data of this model, it becomes CSV as below.

(Id), (a), (b) 1000, 0, aaa 1001, 1,

Depending on the conditional viewing authority, b column of data with "id = 1001" is empty.(Since it does not meet the condition, it can not be browsed)

In this state, correct the a column of data of "id = 1001" from 1 to 0 and update CSV upload. In this case, it is necessary to pay attention to that the value of column b is updated from "from" bbb "originally stored in the database) to" character ".

To deal with this problem please do as follows.

  • When uploading and updating a model including conditional authority, always execute it with an administrator account.
  • Items containing conditional authority are not subject to CSV download.

Specify character encoding

When using the Wagby application with the browser on the iPad, change the character encoding of the CSV file to "UTF - 8".

With the iPad, you can save and edit downloaded CSV files by linking with other applications (which can handle CSV files) such as Evernote and Numbers.
When this setting is made,allThe character encoding of CSV download is UTF-8.Normally, Excel does not support UTF-8 format CSV file, so it will be displayable on iPad, but it is necessary to devise a way to open it in Excel.(You can find many advices by searching "excel utf - 8 csv" in the search engine.)

Using the back button of the browser

When using the CSV download function from the iPad, it is necessary to press the "return button" of the browser in order to make transition from the download screen to the screen displaying the CSV file.

In Wagby, use of browser's "back button" is deprecated, but only in this case it is handled as an exception.

The character encoding standard of the CSV file is Windows - 31J.It corresponds to the Japanese environment only.

If you include multilingual data,Please change the character encoding of this model to utf-8.

- Be careful when opening the downloaded file with Excel.Since Excel does not support utf-8 format CSV file, it needs to be devised.You can find a lot of advice by searching for "excel utf - 8 csv" in the search engine.
  1. Open Excel.Click "Data" - "Import External Data" - "Acquire Data" on the menu bar.
    Fig. 18 Open Excel and import data
  2. Select "CSV (TSV) file" in "Select data file".
    Figure 19 Open Excel and import data
  3. Check the data with "Text File Wizard".
    Figure 20 Text File Wizard (1)
  4. Specify "comma" as "Delimiter".(For "TSV file, specify" tab ".It is specified by the standard.)
    Figure 21 Text File Wizard (2)
  5. Select the column specified in "Preview data" and specify "Column data format".(In this case, I have specified "character string" so that the display format is displayed as it is.)
    Figure 22 Text File Wizard (3)
  6. Data acquisition is complete.You can see that it is displayed in the specified display format.
    Figure 23 Data Acquisition Complete