-
Notifications
You must be signed in to change notification settings - Fork 0
pts plain option loop
Click Plain / Option Loop on the SYSTEM ribbon panel to display the Insert Option / Counter Loop window. Read more: Command Syntax
|
|---|

Use this type of loop to iterate through a fixed set of values or number sequence. You must press Insert (or Update if editing an existing command) for your changes to be applied to the current script in the editor.
To learn more about the features of this window, glance down the table below or highlight the control you are interested in by clicking on the screenshot above.
Variable to hold value at each loop
Type in or select the variable that you want to use to hold the loop iteration value. For example:

(Example 1)
Use row counter
Set this option if you would like to retain the number of rows within the loop. This is probably more useful for when you are using a variable containing an unknown set of options, or the numeric counter with a dynamic set of values (as opposed to literal). For example:

(Example 2)
From options list
You can loop a set of values by either using a user defined set of literal values (see example 1) or an existing variable which contains a set of comma delimited values (see example 2).
Counter
You might prefer to use a numeric counter. Basically, you set the start, end and increment values as required.

(Example 3)
- You can omit the increment; it defaults to 1.
- The start, end and increment expressions are not limited to whole numbers (integers); they can be floating-point numbers as well. They can even go backwards using a negative ‘increment’ (decrement!). As long as you can get from the start to the end by applying the increment, it will work.
- Plain counter loops are static loops. That means that the start, end and increment expressions are evaluated once at the beginning of the loop, using current variable values, and the list of values that the loop will walk is built in advance. Changing the value of variables used within the start, end or increment expressions during the loop will have no effect on how many loops or what values are used in subsequent iterations.
Copyright © 2002 - 2025 by Andrew Truckle. All Rights Reserved.
- Using Public Talks
- Main Application Menu
-
Database Ribbon Panel
- Assignments Editor
- Backup Database
- Check Talk Exchange
- Compact Database
- Convert Database
- Create Unassigned Date Entries
- Database Security
- Maintain Databases
- Purge Database
- Rearrange Dates
- Restore Database
- Help Ribbon Panel
-
Home Ribbon Panel
- Create a Report
-
Manage Custom Reports
- Editing Scripts
- Content Ribbon Panel
- System Ribbon Panel
- Script Command Syntax
-
Tutorials
- Using The Script Editor
-
How To Write Scripts
- Module 1 - The Basics
- Module 2 - Hello, World!
- Module 3 - Multiple Text Blocks
- Module 4 - It's A Date, Then
- Module 5 - Oh, I'm Blushing!
- Module 6 - It is a Rainbow!
- Module 7 - The Font Of All Knowledge
- Module 8 - Queue To The Right
- Module 9 - Memory Like An Elephant
- Module 10 - May I Squeeze In There?
- Module 11 - Move Over, Please
- Module 12 - You Move Over Here
- Module 13 - Is My Back A Funny Colour?
- Module 14 - I'm Going Loopy Here!
- Module 15 - Fields Of Golden... Text
- Module 16 - Man, That Looks Weird
- Module 17 - Inner Peace, Inner Loop
- Advanced Script Features
- Quick Access Toolbar
- Settings Ribbon Panel
- Tools Ribbon Panel
- Revision History
- Contact Information
Click Plain / Option Loop on the SYSTEM ribbon panel to display the Insert Option / Counter Loop window. Read more: