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.

Scripting the sort

Featured Replies

Hi, Is there any way of using a variable to drive the sort command? I presently have a script which takes a script parameter and works out things like how the list is currrently sorted etc. This is all done through one piece of scripting and I don't need to rewrite the script every time I add a new sort criteria.

What I currently have to do though is put a separate piece in for each sort criteria when it comes to the actual sort:

pseudo code




if$scriptparam="Week"

   Sort Records by week Ascending

elseif scriptparam="Date"

  Sort Records by date Ascending





I have to do that because in each sort you seem to have to select the sort criteria and there is no ability to pass the variable. What Id like to do is use the $scriptparam variable to drive the sort.



e.g.

 

Sort Records by $scriptparam ascending

This would avoid the need to add to the ElseIf part of the script everytime I want a new sort field.

Hope this makes sense!

John

Unfortunately, sorting is still hard-coded and context specific. How I wish you could click a specify button and get to the calc engine in the Sort dialog.

You could always sort by one field, and set that field when the sort column button is clicked. Watch out for techniques (and I've used them) that put field names in script parameters, etc. Change a field name, and your sort is broken!

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.