Jump to content
Sign in to follow this  
ML2008

Define field to show all value list items

Recommended Posts

It is not clear to me if you mean, attach a value list to a field, or have the field equal the value list in some way.

To attach a value list to the field, first create the field and the value list. Then go into Layout Mode, Select the Field, Go to Menu >> Format >> Field Format. In the dialog box, select the type of "Style" you want for your value list (it defaults to Pop up list), then select the value list in the drop down menu on the right.

If it is the other, there was a recent thread (yesterday and today) called "Checkbox "views" ". It's located in the Topic area for Value Lists. While you are there, take a look around at some of the other subjects, maybe one or two of them will be helpful.

Lee

Share this post


Link to post
Share on other sites

I tried the function:

ValueListItems ( "Respondents" ; "Names" )

According to the documentation, this calc should have the field show all the contents of a particular value list, each item seperated by a return.

Cant get it to work. The only thing that shows up in the field is a question mark ?

Anyone know how to get this to work?

Larry

Share this post


Link to post
Share on other sites

Are its storage options set to "Do not store"? Is it a Text result? Are the names exactly right?

Share this post


Link to post
Share on other sites

I have something to add to this. I have recently used the valuelistitems function and it does not update until a new record is created. I have it set as a global field. Any ideas? Is this how it is supposed to be? I am using version 7.0v3.

-Tanner

Share this post


Link to post
Share on other sites

You need to enclose the function within Evaluate or else it will only recalculate when a new record is created.

Evaluate( "ValueListItems( Get(FileName); "yourvaluelist" )"; field_on_which_list_is_based )

Whenever field_on_which_list_is_based is changed, the calculation will evaluate. In order to refresh the data onscreen and for immediate calculations, you will need a script to set field_on_which... to itself and Commit Records/Requests.

Share this post


Link to post
Share on other sites

Ooohh, Thank you. That works perfectly. One more question if you don't mind. what are the back slashes for?

Share this post


Link to post
Share on other sites

A backslash is an escape character in FM 7. It treats the character immediately following it literally. If it weren't for the backslash before the double quotes, each would be treated as a text delimiter instead of as a literal double quote. So "ValueListItems( Get(FileName); " would be seen as text, yourvaluelist would be seen as a field name, and " )" would be seen as text. It basically makes it easier than typing four double quotes for each double quote that you want to appear within the text, as is necessary in previous versions.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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