AutoID Heater, generating consecutive numbers
The AutoID Heater enables you to generate a consecutive sequence of numbers automatically. The generation assigns the first record/row according to the Start parameter and increments the initial value for each record/row by the amount of the Step parameter. In the example below, the first record would be assigned 1, the second 2, the third 3, and so on.
Configuration
Decimal accuracy is set by the Decimals parameter and the Step parameter can also cope with decimal fractions, making it possible to generate some extremely odd looking values. Of course, the AutoID Heater can also count backwards; to do this you simply enter a negative value in the Step parameter.
The output of the AutoID Heater can be used more than once (as many times as you wish). The output value remains the same until the next record is processed.
Reset
Reset to Start: If you check this option, the counter (AutoID value) is automatically reset to the “Start” value defined as soon as the counter exceeds the value in "if greater than" entered below.
Filter
Ignore filtered records/rows: When you check this option, no AutoID values will be generated for records/rows that are filtered out. This avoids potential gaps in the consecutive numbers that are generated when data is filtered out. The default setting is to ignore filtered records.
Note: This option is only active when at least one Filter Heater is used in the Definition.
Effect on
All: The number sequence is generated consecutively according to the processed records/rows of the WRITE Adapter. This is the standard setting.
Only every X records: When you check this option, the consecutive values generated are only incremented each time a specified number of records or rows is processed. Using this option it is fairly easy to create exports that are separated into several output files (split). See below for a video example of this.
Equal incoming parameters: You can furnish the AutoID Heater with several values with this option. All values supplied are combined as criterion for comparison. The AutoID Heater then generates a separate counter for each unique value. The respective counter is increased by the specified value (step) when identical parameter value(s) are present or are repeated. The increased value of the counter for the unique criterion is returned each time. The data source does not have to be ordered by the comparison criterion.
Group change – Automatic detection: If you check this option the counter will increase by the specified value (step) whenever the incoming parameter changes. This option allows you to define several incoming values that in combination represent the comparison criterion for group change.
Group change – Begins with / Ends with: These options allow you to specify with which incoming parameter values the counter should increase.
Note: In the case of “Begins with” the counter will be incremented immediately, whereas for “Ends with” the counter is incremented after processing of the current record.
GroupBy (Heater): This option only becomes active if you have already used the GroupBy Heater in your Definition. If this option is selected, the sequence is reset for each group and effectively counts the grouped rows.
GroupOut (Heater): This option only becomes active if you have already used the GroupOut Heater in your Definition. If this option is selected, the sequence is reset for each group generated and labels the duplicates serially.
Count down: When this option is checked, the number of records copied by the GroupOut Heater is counted down until 1. This option is useful, for example, when the last record of a copied group is to be marked dynamically. In this case you can check with a condition (=1) whether the last record was reached.
Notes on formatting and numbers of decimal places
If the output is subsequently processed as a string, the numbers generated are converted in accordance with the format configuration of the WRITE Adapter. Including the locale, this determines the symbol used for decimals (point or comma), the number of decimal places, whether the minus sign is a prefix or a suffix, and many other format options.
Please also refer to the general information on the use of Heaters (functions)
Examples
The AutoID Heater is used in the following examples:
- Simple data filter and grouping example
- Expert MS Excel CSV data export
- CSV export divided into several files
Video Example