Exporter - Custom Fields

You can define custom fields to include in your exported data, these custom fields can be simple hard coded values or expressions that will evaluate to a runtime value during export.


You can define Custom Fields by clicking the Custom Fields button on the Select Fields dialog shown in Fig 1


Fig 1

Fig 1


Cliking the Custom Fields button brings up the Custom Fields dialog shown in Fig 2



Fig 2

Fig 2


The example in Fig 2 shows three custom field defined, the "Exported On" field will contain the date the data was exported, Custom 1 will contain the string "Testing 123" and Custom 2 will contain the value "£0"


The value property allows hard coded strings, selectable place holders or typed expressions, using the drop down list you can select the following place holder values:
{CurrentDate} = The current date
{LastExported} = The date the job last ran an export
The place holders can also be used to filter the data being pulled from Sage.
You can also reference other fields from the exported data, for example if you had the columns SALES_PRICE & QTY_IN_STOCK you could add the following custom field:
Field Name = TotalValueInStock
Is Expression = True
DataType = String
DataFormat = Currency
The would result in a field added to the export data containing the total value of the product you have in stock formatted as currency

Is Expression
Used to tell the application if the value should be treated as a literal string or an expression to evaluate at export time.

Define the internal data type of the custom field, normally you can leave it as "String", the only time you need to change it is when you have another field reference this one in an expression, for example if the other fields expression is evaluating mathematical expressions on this field then the data type of this field would have to be a numeric data type.

Used to apply formatting to the exported data, only String type columns can be formatted.



If you are defining a custom field that will be referenced in the expression of another custom field you must define the field containing the expression AFTER the one being referenced, this is because the expression will fail during export if the field being referenced has not been created first.