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.

Script Step: Sort Records by Calculation

Featured Replies

Name: Sort Records by Calculation

Type: Script Step

Parameters: fieldNameList [ValueList], sortOrderList [ValueList]

These are both set by specify calculation dialog boxes. It is the users responsibility to make sure they balance - otherwise script step returns error ("invalid parameters" or some such).

fieldNameList is a valueList of field names.

sortOrderList is a valueList containing: ascending, descending OR 'valueList' for custom order.

Behaviour:

if ( ValueCount ( fieldNameList ) ≠ ValueCount ( sortOrderList ) ) then ERROR "invalid parameters" (as above)

Perform sort with field order given in list, using sortOrder to determine individual field sort order.

Example usage:

Sort Records by Calculation ( "MonthsOverdue¶DueAmount" ; "Descending¶Descending" )

Workaround [Mac only]:

Put it in a script wrapper with those two parameters. Have sort fields present on layout to enable use of following code within PerformAppleScript:

"sort by { field "" & Substitute( $fieldnameValueList ; "¶" ; "", field "" ) & "" } in order { " & Substitute ( $sortorderValueList ; "¶" ; ", " ) & " }"

Instead of AppleScript, I suspect there's a way to kludge this using XML and Snapshot Link.

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.