REPEAT ER function

The REPEAT function builds a record that contains the field that has a value that matches the specified input. It then returns a new Record list of a record that is repeated a specified number of times.

Syntax

REPEAT (item, number)

Arguments

item: Any supported primitive or composite data type

The value to repeat.

number: Integer

The number of repeats.

Return values

Record list

The resulting list of records.

Usage notes

The list of repeated records that is returned exposes the following fields:

  • The specified value (Item field)
  • The current record index (Number field)

Note

Because one-based numbering is used for this function, the Number field has the value 1 for the first record of the resulting list.

You can use this function to multiply existing data so that you can do performance and volume testing of Electronic reporting (ER) solutions by using the Regression suite automation tool (RSAT).

Example

You want to generate a document in XML format that must contain as many Party XML elements as you specify in a data entry field in the dialog box at runtime, before the execution of an ER format begins.

The following illustration shows the ER format. In this format, the single Party XML element is added to expose the properties of a single party.

Format structure on the Format tab of the Format designer page.

The next illustration shows the following configured data sources:

  • The Party data source that represents a single party. The Party.Value field is used to expose a single text value.
  • The NumberOfRepeats data source that is used to offer a data entry field in the dialog box at runtime, so that you can specify the number of parties that should be entered in the generated document.
  • The Party2 data source that repeats the Party record the number of times that you specified in the NumberOfRepeats data source.

Configured data sources on the Mapping tab of the Format designer page.

The next illustration shows data bindings of the editable ER format that are created to generate output in XML format. This output presents individual parties as enumerated nodes.

Configured data bindings on the Mapping tab of the Format designer page.

The following illustration shows the result when the designed format is run and the value of the NumberOfRepeats data source is specified as 5.

Result of running the format on a new web browser tab.

Additional resources

List functions