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.

Sorting the result of the List() function

Featured Replies

The result of List(field) comes out in record creation order.

Is there any trick to control that?

I'm populating a single calculated text field in the main file with a list of field data from a 'many' relationship (thru a join table), and would like to allow the user to control the sort order of the result by modifying a field within the table the list is pulled from.

Looking into "create a value list based on values of the field in question, make it a conditional value list based on the relationship ID... then use ValueListItems() to return only the unique values. Works best in a script."

That worked.

As the target field to make a list from was a calculated text block, itself with a list from yet another field, : , I had to replace all ¶ with # so I could sort the field as a single item, then subbed them back after using VLI().

Edited by Guest
Solved.

The result of List(field) comes out in record creation order.

This is true only if the relationship isn't sorted.

  • Author

LOL! Your English was perfect. Where were you an hour ago? (and why did I not think to try that). Thanks!

I still needed to sub out the ¶ for # to maintain my text blocks, so not truly a waste of time.

There is even to say that the relationship's sort could be modified programmatically by changing the value of a summary field and sorting that relationship by the summary field.

Sort_the_rel.zip

What did you aspect from a ChindoguMaker ? :

:funnypost:

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.