Jump to content

How can I add static options to a dynamic value list?


Chuck
 Share

This topic is 2282 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Has anyone come up with a way to nicely add a couple of static options to a value list generated from a field?

For example, assuming I have a field that I'm using to create a value list. I want the exact same value list, but with "All", "Mine", and a separator to appear at the top. I figured out a way to create a value list that includes "All" and "Mine" in addition to the names in the field the values are drawn from, but the words appear in their alphabetical order, not at the top.

My fallback solution is to have radio buttons for "All", "Mine" and "Values" with the value list only showing up if the user selects the "Values" radio button, but this wouldn't be as elegant as what I'm trying to do.

Thanks,
Chuck

  • Like 1
Link to comment
Share on other sites

I removed my comment because I did not read your question carefully... sorry,

I don't know of any solution for the sorting problem. In your scenario that works only in combination custom value lists, I think. Though you could capitalize "ALL" and such values to make them stand out at least?

Untitled.fmp12.zip

Edited by artvault
Link to comment
Share on other sites

Create a one record table.

Create a calculation field that gets the 'ValueListItems' from the value list in question.

Add any static elements you want in the calculation then reference this field as your value list. 

I'm a bit rusty but I think that should work.

You could put the static items in a text field and add that to your list. That way the list is editable.

Link to comment
Share on other sites

7 hours ago, normanicus said:

Create a one record table.

Create a calculation field that gets the 'ValueListItems' from the value list in question.

Add any static elements you want in the calculation then reference this field as your value list. 

I'm a bit rusty but I think that should work.

You could put the static items in a text field and add that to your list. That way the list is editable.

That's exactly the sample file that I created for this thread and added above... :-)  BUT it doesn't solve the problem with the order of the entries. FileMaker re-sorts alphabetically. And that was the actual question of the poster.

Edited by artvault
Link to comment
Share on other sites

On 03/28/2016 at 1:39 AM, Chuck said:

I want the exact same value list, but with "All", "Mine", and a separator to appear at the top. I figured out a way to create a value list that includes "All" and "Mine" in addition to the names in the field the values are drawn from, but the words appear in their alphabetical order, not at the top.

A value list based on values from a field will always be sorted alphabetically (if the field type is Text). If you want some values to appear at the top, prefix them by a space (for example). For the same reason, I don't know of a method to insert a separator at a chosen location.

Link to comment
Share on other sites

This topic is 2282 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.