A preset is a file preferably in the Templates folder that pre-defines a number of settings for an interaction. The format is based upon the following XML structure:
```xml
<?xml version="1.0" encoding="utf-8" ?>
```
```xml
<PresetInfo>
<Code>ENTRIES</Code>
<SqlFile>file.sql</SqlFile>
<Format>Xml</Format>
<Action>Transform</Action>
<Xsl>ecotaksen-all.xsl</Xsl>
<XslOutputTranslate>true</XslOutputTranslate>
<LogRequestProgress>true</LogRequestProgress>
<ConnectionName>ECOTAKSEN\MAIN</ConnectionName>
<ParameterValues>
<Parameter><Name>par</Name><DotnetDataType>int32</DotnetDataType><ForceValue>true</ForceValue><Value>25</Value></Parameter>
<Parameter><Name>upload_file</Name><DotnetDataType>ByteArray</DotnetDataType></Parameter>
</ParameterValues>
</PresetInfo>
```
with the following meaning:
- the optional module code is registered as 'Code'.
- the SQL file (SqlFile) is preferably located also in the Templates and the contents of this file will be used as a pre-set for the request parameter '[query](invantive-data-access-point-request-parameters)'.
- As an alternative you can provide a SQL statement in the preset, using SqlStatement.
- the format (Format) has the same meaning as the request parameter '[format](invantive-data-access-point-request-parameters)'.
- the action (Action) has the same meaning as the [endpoints](invantive-data-access-point-endpoints) Results and Transform. Other values are not supported.
- the xsl (Xsl) is the name of an XSL-file which is used in combination with the format XML. It defines the mapping through which the XML is processed. Many [XSL transformation parameters](invantive-data-access-point-xsl-transformation-parameters) are available.
- the XslOutputTranslate specifies whether to apply XSL transformation.
- the IncludeHeaders specifies whether to add headers to the output where applicable. The associated request parameter is 'includeheaders'
- the HeaderFormat specifies what type of headers to include and can be '{name}' for a technical name and '{labelsingularcomposed}' for a user friendly name. The related request parameter is 'usetechnicalheaders' which can be true or false.
- the PrintParameters specifies whether to print parameters in the output and can be true or false. The associated request parameter is 'printparameters'.
- the ContentType specifies a deviating desired MIME content-type. The associated request parameter is 'contenttype'.
- the DispositionType specifies a deviating desired disposition type. The associated request parameter is 'dispositiontype'.
- the ContentFileName specifies a deviating desired file name and download as attachment. The associated request parameter is 'contentfilename'.
- the AccessControl is follows definition on all Invantive Web projects for access control, but specifically for the preset provided.
- the LogRequestProgress is a boolean value whether for the specific preset request logging is required.
- the connection name (ConnectionName) has the same meaning as the request parameter '[connection](invantive-data-access-point-request-parameters)'.
### Parameter Values
Values to bind to SQL parameters can be specified using ParameterValues. Parameter values specified in a preset overrule identically named request parameters. Parameter values consist of a list of parameters and their values, where each parameter has three elements:
- Name (Name) of the parameter.
- Data type (DotnetDataType) of the parameter.
- String representation (Value) of the parameter value.
- Whether for force the use of the parameter value specified or only use it as a default (ForceValue).
The following data types are available:
- bool
- byte
- ByteArray: to process files presented as POST parameters.
- char
- datetime
- datetimeoffset
- decimal
- double
- float
- guid
- int16
- int32
- int64
- uint16
- uint32
- uint64
- object
- sbyte
- string: texts.
- timespan
- null