DataProviderExport

Overview

The DataProviderExport class facilitates the customization of data exports by allowing the setting of formats, headers, and value lists for data providers. It is designed for seamless integration with export tools.

Functionality

The setFormat(format) method applies a specific format to the data provider's value, enabling control over date, number, or string representations. Headers can be customized using setHeaderText(headerText), which overrides the default data provider name in the export file. The setValueList(valuelistName) method maps value lists to data providers, resolving display values for more readable exports.

Methods Summarized

TypeNameSummary

Set format for dataprovider value.

Set header text for dataprovider value.

Set valuelist to resolve display value for dataprovider.

Methods Detailed

setFormat(format)

Set format for dataprovider value.

Parameters

  • String format the dataprovider format

Returns: DataProviderExport dataprovider export object

Sample

var exporter = plugins.textxport.createExporter(forms.form1.foundset,';',false);
exporter.addDataProvider('mydate').setFormat('yyyy/dd/MM');
var content = exporter.textExport();

setHeaderText(headerText)

Set header text for dataprovider value. If no header text is set and exportHeader is true dataprovider will be used as header text.

Parameters

  • String headerText the header text

Returns: DataProviderExport dataprovider export object

Sample

var exporter = plugins.textxport.createExporter(forms.form1.foundset,';',true);
exporter.addDataProvider('orderid').setHeaderText('Order ID');
var content = exporter.textExport();

setValueList(valuelistName)

Set valuelist to resolve display value for dataprovider.

Parameters

  • String valuelistName the valuelist name

Returns: DataProviderExport dataprovider export object

Sample

var exporter = plugins.textxport.createExporter(forms.form1.foundset,';',true);
exporter.addDataProvider('item_id').setValueList('myvaluelist');
var content = exporter.textExport();

Last updated