Feature Rich
Rapid Application Development
Helping you or your customers
Manage their Business

All Commands All Program Flow
Commands

FOR_EACH

Loop through a list of database items.

Any code between the FOR_EACH and END_FOR_EACH statements will be executed for each qualifying item.

The {COID} command will return the ID of the current object in the loop.

You can use the {LOOP_COUNT} command to return the current iteration.

This command requires an {END_FOR_EACH} command.

Number Name Default Type Description
1 query 0 String A Query describing the objects to loop through
- page_num 0 Integer The Page to return if you specify a page size in the page_size parameter
- page_size 0 Integer The size of the page to return
- ap1 String Additional Parameters 1 - 8 to pass to the query
Basic Example

The code below uses List ID 6611 which contains the following:

List ID: 6611

List Name: Ice Cream Flavours

List ID Children:

  • Vanilla - Object ID 6616
  • Strawberry - Object ID 6617
  • Chocolate - Object ID 6618

So as you can see we require the Children of List ID 6611 and we achieve this by using C which is the Child Function.

Vanilla
Strawberry
Chocolate
Using LOOP_COUNT Example

The code below used Ultimate Database List ID 6611 which contains the following:

List ID: 6611

List Name: Ice Cream Flavours

List ID Children:

  • Vanilla - Object ID 6616
  • Strawberry - Object ID 6617
  • Chocolate - Object ID 6618

1:Vanilla
2:Strawberry
3:Chocolate
to add a Comment.