Jump 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.

Featured Replies

I have a list of names that can vary. I have to spread them equally into six groups, where group six would have a minimum of two, or a maximum of the other groups.

So.. groups one to five will be equal size, and group six will handle the carry over.

Rivet, try script below, you will need 3 global numbers and one number field in your db to hold the group number (GrpNo), RecCnt,RecCounter, and CurGrp are global numbers.

This works on found set.

SetGroup:

If [ Mod(Status(CurrentRecordCount), 6) = 0 ]

Set Field [ RecCnt, Status(CurrentRecordCount) / 6 ]

Else

Set Field [ RecCnt, Int(Status(CurrentRecordCount) / 6)+1 ]

End If

Set Field [ RecCounter, RecCnt ]

Set Field [ CurGrp, 1 ]

Go to Record/Request/Page

[ First ]

Loop

Set Field [ GrpNo, CurGrp ]

Set Field [ RecCounter, RecCounter - 1 ]

If [ RecCounter = 0 ]

Set Field [ RecCounter, RecCnt ]

Set Field [ CurGrp, CurGrp + 1 ]

End If

Go to Record/Request/Page

[ Next, Exit after last ]

End Loop

If you have 26 people, you can't meet your standards:

Groups 1-5 are equal,

Group 6 has minimum of 2, maximum of number in other groups.

5x5 = 25, leaving 1 for group six.

5x4 = 20, leaving 6 for group six.

You'll have to change your standards.

  • Author

your rigtht, then I have to figure a way so that if the is a single name left over reduce the number of groups by one.

Actually, with 26 people, you're screwed with 5 groups as well.

Create an account or sign in to comment

Important Information

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

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.