10 Replies Latest reply on Feb 16, 2011 11:43 AM by C.Sp.

    Value List

    C.Sp.

      Title

      Value List

      Post

      I created a value list based on a field in a relationship people to people1. I wrote a script to use the value list in a Find. When I click on the field in the browse mode, the value list pops up correctly. But it does not pop up in the Find mode when the script runs.

      I used this same script successfully in Filemaker 5 but I cannot get it to work in Filemaker 11.

      Any suggestions would be appreciated, Thank you.

      Picture_1.png

        • 1. Re: Value List
          philmodjunk

          What kind of value list? What options did you specify when setting it up?

          • 2. Re: Value List
            C.Sp.

            The value list is names from the people file. 

            the relationship is based on a field that identifies the names as "current" or "d/c'ed".

            The value list shows me only the names of "current" records.

            • 3. Re: Value List
              philmodjunk

              Exactly how did you set up the relationship so you only see "current" people? (I want to try to replicate what you are seeing exactly in a test file to see if this matches any bugs of which I am aware.)

              One approach I prefer avoids the whole issue: I use a global field for the value list (with additional global fields for any other criteria) and don't enter find mode until the user clicks a button or exits a specific field.

              • 4. Re: Value List
                C.Sp.

                I posted a screen shot on the initial post

                • 5. Re: Value List
                  C.Sp.

                  In response to the global field answer, the field is a calculation : last name + first name. I am not sure how to make this work with your answer about a global field.

                  • 6. Re: Value List
                    philmodjunk

                    So your value list lists values from People 2, show only related values starting from People?

                    what kind of field is "Current"?

                    • 7. Re: Value List
                      philmodjunk

                       I am not sure how to make this work with your answer about a global field.

                      The global field is used to enter search criteria, not as a source of values for the value list.

                      Define a global field, gName in People. Format the field with your value list.

                      Use this script:

                      Enter Find Mode[]
                      Set Field [People::cFullNameCalcField ; People::gName]
                      Set Error Capture [on]
                      Perform Find[]

                      In browse mode, the user selects a name in gName then starts the above script. The script enters find mode, then enters the data from the global field into the field on which you want to search and then performs the find.

                      • 8. Re: Value List
                        C.Sp.

                        yes, to the relationship question

                        current is a text field

                        I will set up the field and script and get back to you.

                        • 9. Re: Value List
                          philmodjunk

                          A few observations:

                          That value list will only return the expected values if the current record has a value in current.  In find mode, this field is empty like any other and thus no matching related values appear in the value list when you enter find mode.

                          If you want this value list to work while in find mode, there are two options that do work:

                          1. Define a calculation field: If ( Not IsEmpty ( Current ) ; cFullnameField ; "" )
                            Use this field as your source of values. No relationship is needed.
                          2. Define a calculation field, cCurrentKey, and enter the text in this calculation field that marks all "current" people records. Use the Storage Options button to choose global storage for this calculation. Update your relationship so that it looks like this: People::cCurrentKey = People 2::Current. With global storage specified for cCurrentKey, the relationship will work in Find mode.

                           

                          • 10. Re: Value List
                            C.Sp.

                            Thanks!! this was my first time using the forum.

                            I used this option:

                            Define a calculation field: If ( Not IsEmpty ( Current ) ; cFullnameField ; "" )

                            Use this field as your source of values. No relationship is needed.