Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looping Question. . .

Featured Replies

Greetings, I'll try to make this as simple as possible. I'm just now breaking into working with loops, or at least realizing that I could use one here. I would like to loop through a set of records to determine the total qty. of 4 different size binders from one field <binder size> among dozens of clients--each client represents a separate record. (i.e. Client A would have 1 2.5" binder; Client B would have 2 1" binders). I plan on sorting by <consultant>, for one consultant has many clients. I think that I should have 4 global fields, 1 for each of the 4 sizes. These fields should be used to paste the result of the loop calc, right?

Basically, what would be the best way to do this? Anything would be great!!

What would be the simplest way to do this?

Thanks,

Jon

First of all, yes, you can do this with a loop. I'm going to make some assumptions about how your database is constructed because I'm not entirely sure of the details given your post.

First of all, since you say that each record is a client, and a client could need multiples of any particular binder size ("Client B would have 2 1" binders"), I'm assuming that you have four number fields that track the number of binders each client needs of each size. I'll call these fields, SizeCount1, SizeCount2, SizeCount3 and SizeCount4.

Create four global number fields. I'll call them gSizeCount1, gSizeCount2, etc.

Once you have the found set of records, you can use the following script.

Set Field ["gSizeCount1", "0"]

Set Field ["gSizeCount2", "0"]

Set Field ["gSizeCount3", "0"]

Set Field ["gSizeCount4", "0"]

Go to Record/Request/Page [First]

Loop

  • Author

Thanks for the reply. I currently have one field labeled "Binder Size" that contains, per client, one of 4 different values. I imported this info direct from Excel and had thought that creating 4 different size fields would be better, but wanted to take a stab at this first. Can I still loop a set of records and pull the different values from one field and place them into the appropriate global fields, i.e. the 4 gSizeCount fields??

Yes, you can, and there are a number of ways. I'll cover the scripting way. Just edit the script I originally gave you to look like this. I've assumed a single field called Size which holds one of four possible values.

Set Field ["gSizeCount1", "0"]

Set Field ["gSizeCount2", "0"]

Set Field ["gSizeCount3", "0"]

Set Field ["gSizeCount4", "0"]

Go to Record/Request/Page [First]

Loop

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.