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.

Help with Internal Sorting

Featured Replies

  • Newbies

I am making a database program to automate game turns for a proportional movement game system, and cannot figure how to have FM sort the units moving each turn. Each record is a different unit, saving the unit's speed, information, etc.

There are 32 separate moves per turn, with some, none, or all of the units moving during each of the 32 segments. Whether a unit moves depends on its speed, i.e., something moving Speed 32 will move each segment, something moving Speed 16 will move every other segment, something moving Speed 4 will move every eighth segment, etc. I have it set up by a separate field for Segment 1, Segment 2, etc., to calculate whether a unit moves that segement based on its current speed. Each segment, though, the slowest unit will move first, followed by the second slowest, etc.

After determining which units move in that segment, what I am looking to do is output a list of the units ***in the order that they move*** (slowest to fastest). Therein is my problem. They are already in the database and a simple sort doesn't work (or I can't get it to work). A summary field doesn't work either as I need to keep it out of Preview Mode so I can maintain interaction with the fields. Can anyone help with a function, string, relation, solution, approach, etc., that can perform this?

If as you say each record is a unit and includes the unit's speed, what is the difficulty in sorting the unit table by speed? Please be more specific than "doesn't work."

  • Author
  • Newbies

Ok, here's more specific info. Each unit is a separate record. A field in each record has the unit's speed. From there, there is a field for Segments 1-32 that is a calculation that figures out if the unit moves on that segment or not, based on the units speed. Different units moving at different speeds will result in, for example, units 2, 4 and 5 moving on segment 5, units 2 and 5 moving on segment 6, units 1 and 4 moving on segment 7, and units 1, 2 and 5 moving on segment 8, etc. Therefore, I have a different list of units moving each segment.

What I want to do is have a one page list of all segments, showing who moves in what segment and in what order they move. To do that, I need to calculate in one field which units move, and which unit moves first. Therefore, I will end up with 32 global calculation fields with a text result that shows which units move, and in what order.

Does this help?

Thanks in advance .....

It sounds like segments should really be a separate table.

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.