SDG/Config/IronPython.IndexedLabel.xml

<?xml version="1.0" encoding="Windows-1252"?><generators>
<generator type="RedGate.SQLDataGenerator.ExpressionGenerators.Python.PythonScriptGenerator" name="Numbered Label" description="Label 42, Label 43, Label 44 (using IronPython)" category="Business">
<property name="Code"># Specify a string stem as constant and append an incrementing number to it
 
def main(config):
    return list(Sequence(config["n_rows"])) # The max number of rows available
 
def Sequence(max):
    for i in range(1, max + 1): # Modify the range start and end points in order to offset the row number
        yield "Label {0}".format(i) # Format the output string here
 
</property>
<property name="ColumnType">nvarchar</property>
<type sqlType="NVarchar" type="String" />
</generator>
</generators>