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.

Alphabetize values using List function

Featured Replies

Greets, all:

Is there a way to alphabetize values when using the List function? If you open the attached quick-'n'-dirty solution I'm building for my wife (Click a recipe [Multigrain...] then click VIEW button at top), you'll see the list of ingredients but I'd like them alphabetized. Note that the VIEW page will end up becoming printable, so no portals because they won't be able to self-expand to accommodate a long ingredients list.

I'm sure the answer's simple...which is a good thing since I'm simple-minded, anyway.

TIA for your help!

Grace Recipes.fmp12

Actually, there are several possible answers to this:

First, the List() function follows the sort order of the relationship - so if you sort the records on the Ingredients side of the relationship by the field listed by the List() function, the returned list will be in alphabetical order.

Next, you have the SortValues() function, that you could apply to the list returned by the List() function. Before this function became available (in v.16), you could have defined a value list and use the ValueListItems() function to return the values in alphabetical order (with the side-effect of returning only unique values). 

However, the simple answer is to sort the portal. Yes, a portal is the best way to view related records. As for printing, print from a list layout of the Ingredients table, with the Recipe fields placed in the header, footer, grand summary and/or sub-summary parts.

 

 

 

 

Edited by comment

  • Author

Beauty! Thanks!! I didn't know that the List() function follows the sort order. Good to know!

At first I created a value list of the calculated (Ingredient_Qty_Unit__lct) field and using ValueList Items(), but that picked up all the values and listed them for every recipe. Oops. So, either my thinking was wrong or I messed on the relationship.

Edited by WF7A

3 hours ago, WF7A said:

I created a value list ... but that picked up all the values and listed them for every recipe.

That's because you did not define the value list to include only related values.

 

  • Author

>Insert "D'oh!" here<

Just out of curiosity: why would you want to alphabetize the ingredients? From the few recipes I've seen, I would expect the "important" ingredients to come first - e.g. if it's potato soup, then potatoes would be listed before pepper.

You're making the assumption that my wife has a logical mind. : D (I'm not being mean or insulting, she just doesn't.) Some of the ingredients are listed twice. I asked her about that: "That's because I use them two differnt times."
"Why don't I go ahead and group the ingredients together for whatever you're making at the time, then?"
*"The Wifoid" throws her hand out at me.* "Ai-yaaah."
...and that's what I live with. Love her to pieces, though.

You noticed, too, that some of recipes are in Chinese (she's Chinese), so I have no idea how that's sorted.

Edited by Rich

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.