Data Export
The Data Export function enables you to export infotable data to a CSV file.
Function Options
• Description—The description of the function
• Export File Name—Sets the file name of the CSV file to export. The default file name is data.csv
• Export Option—Specifies the export format to use for the CSV file. You can export standard CSV or Excel-formatted CSV files.
• Include BOM—Adds a UTF-8 byte-order mark (BOM) to the start of the CSV file.
To Create an Data Export Function
1. On the
Functions panel, click
. The
New Function dialog opens.
2. Select Data Export from the drop down list.
3. Enter a name for the function, and then click Next.
4. Under Export File Name, type the name of the CSV file to export.
5. Under Export Option, select the format that you want to use for the exported CSV file.
6. Click Done.
The function is added to the Functions panel.
Exporting CSV Data Using the Function
1. On the Function panel, bind an event, such as the Clicked event of the Button widget to the Export service of the function.
2. Bind an infotable property from a service, a function, or a widget in the mashup to the Data property of the function. The following example shows bindings for a Data Export function that is used to export data from a service:
3. Optionally, to configure the function dynamically, create bindings to the ExportFileName, ExportOption, and MissingDataMessage properties.
4. Click Save, then View Mashup.
The infotable data is exported to a CSV file when the bound event is triggered at run time.
Properties
Property | Description | Base Type | Default Value | Bindable? (Y/N) | Localizable? (Y/N) |
---|
Data | An infotable input that enables you to bind data from widgets, functions, and services. | Infotable | n/a | Y | N |
Export | A service that exports the bound data as a CSV file. | Service | n/a | Y | N |
ExportFileName | Sets the name of the CSV file. | STRING | data | Y | N |
ExportOption | Sets the CSV file type. Options: CSV Standard and CSV Excel Formatted. | STRING | n/a | Y | N |
MissingDataMessage | Specifies the message to display in the mashup runtime logs when data for this function is missing. | STRING | n/a | Y | N |