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.

Sort via variable value list

Featured Replies

After I have the script perform a Find, I need to sort all the found records in an order that varies 4 different ways. Each record is in a specific category (1-4) and has it's own rating (1-5). Depending on the category number, I need it to sort records by rating, but in different orders. Example: Category 1 = Sort 1, 2, 3, 4, 5; Category 4 = Sort 5, 3, 1, 2, 4.

I've tried creating a value list from a field in which I enter the order I want (to use as custom sort order), but the value list just puts the numbers from the field in numerical order.

Is there any way to do this? And if not in FMP6, could I do it in 7?

Create a calculation field along the lines of:

Case (

Category = 4,

Position ( "53124" , Rating , 1 , 1 ),

Rating

)

Sort on this field instead of Rating.

  • Author

Whoa. Yea. That'll do, that'll do. Took me a bit to figure that one out, but it makes complete sense.

I had a lot of variables that had to go into the sort, so I incorporated it into the calculation. It got to be a big formula, but there's nothing wrong with that at all. It did the trick just fine.

Thanks so much!

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.