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.

Sorted Value List Needing Both Columns

Featured Replies

I want to display a value list that is sorted by year, then name, of the records.

The list should pull it's data for both fields from a table, one field being a PK, the other being the name.

Most solutions I've seen are quite restrictive as they require the use of one of the two fields for the purpose of sorting, but I need both fields.

The only trick I can think of is numbering the PK relative to where an item should appear in the value list, but I see this as more of a kludge than anything any would like to avoid it.

Can you provide more info? You say that you want to store a primary key (good) and show a second field (name). I'm not sure where year fits in this scheme.

What fields do you have in the table from which you'll create the value list? Are you aware that you can use a concatenated field as the second field?

  • Author

Oh field info, sorry forgot. The table I'm pulling the value list from has a "year" that the event occured (it's an events table) and what I want to do is sort the entries by Year decending, then by name, to effectively "group" the events by year. (since it's quite unlikely that older events will be among the user's desired choices I want them near the bottom, and recent events near the top)

The reason I need to use both fields is the first field is set to the primary key, and the second field is set to the name, and the field that gets the value list is the PK field. (using some sizing tricks and "activate field" scripting I hide the actual ID field and display the dropdown when they click the name field)

I don't want my users to be able to see or edit the ID field directly, it should be out of sight and out of mind. They should only concern themselves with the name of the event they want.

Why not use a filtered value list? Have the user select the year they want to select from and filter the value list showing only selections from the selected year.

  • Author

Adding buttons/dropdowns adds cognitive load, also the added step of having to choose a year every time wastes the users time. The more buttons you have, the more that can go wrong (user forgets to click, forgets to select, etc.)

A value list is always sorted by one of the two fields used. This type of requirement is beyond the capabilities of a simple drop-down. Consider selecting from a list or a portal instead.

  • Author

Was afraid of that, ok I'll just do a modal pop-up window. Thank you for your help.

This may help. Hot off the presses!
  • Author

What (if any) significance does "test" have in the primary key?

Edit: ugh took a while to see how it was working, this may work for what I need. Does anyone know some ascii (or is it unicode in FM?) values that are non-printing characters?

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.