14 Replies Latest reply on Feb 5, 2010 12:08 PM by philmodjunk

    Value list from another file gives

    KenS

      Title

      Value list from another file gives

      Post

      Strange error. I have three files data, calendar, and UserInterface. I define a value list for "treatments" in the data file. The value list works fine in the data file when I test it. From UserInterface I make a value list by "Use value list from another file" with it set to the treatments value list in the data file. It works fine here as well.

       

      Here's the strange part. If in the Calendar file I create the same value list by "Use value list from another file" to the same value list in the data file it doesnt work. No apparent problem in setting up the Calendar value list, or the field definition as a pop up menu. In browse mode the pop up menu list one item <Unrelated Table>. Anybody got any idea what this is about? I thought about priviledge problems but there are no priviledge restrictions on the data/value lists.

       

      I cant even think of anything else to check to help sort out the problem...

       

      Thanks

       

      Ken 

        • 1. Re: Value list from another file gives
          RickWhitelaw
            

          Your Calendar table is not related. In the Relationship Graph check the relationships. You may need to create another Table Occurrence of whatever table from the "Calendar" file and establish an appropriate relationship with whatever table from your "Data" file. It would help to know what tables you've created in each file, or perhaps you mean to say that you have three "tables" rather than three "files". Filemaker doesn't care if a table exists in one file or the other as long as the external data sources are correct and the table is referenced in the graph. 

           

          It's not uncommon for a given table to be represented by several occurrences in the graph, sometimes even relating to the same (other) table via different relationships. Once you establish a proper relationship with a TO your problem should vanish.

           

          RW 

          • 2. Re: Value list from another file gives
            LaRetta_1
              

            Hi Ken,

             

            You don't need to create another table occurrence at all.  A value list from another file is not dependent upon a relationship - only that the other file is referenced as an external data source.  It doesn't even need to be in the graph.  I would be inclined to suspect something else, such as the field itself.  Can you make sure the field that the value list is attached to is truly the same table occurrence as the layout it is on?

            • 3. Re: Value list from another file gives
              KenS
                 Thanks to Rick and LaRetta for your repsonse. My understanding of the value list is as you desribed LaRetta. I thought the same thing about whether or not the field was from the same table occurrence. It is. If I change the field to and edit box the field functions normally, for an edit box. But, if I switch back to the pop-up menu/value list it doesnt work. I know the value list is defined properly in the data file as I can use it there and in the main UI file. Also tried adding the value list to another test layout with the same results. Cant make any sense of it. I hope someone has some idea.....
              • 4. Re: Value list from another file gives
                philmodjunk
                   Double check your reference to the "other file" that's the source of your value list definition. Did you, by any chance, change the name of this file, move it to a different folder, or change the name of an enclosing folder? Any of those may have broken the reference to an external file.
                • 5. Re: Value list from another file gives
                  KenS
                    

                  Thanks for the idea Phil. I checked the external file reference and it is still good. I even re-created the value list that reference the one in the "other file". No problem accessing external file for the creation of the value list. Same problem in browse mode.... 

                   

                  Here's hoping for another idea. I double checked, btw, the value list works from another file, the main UI file, that has an external reference to the same value list. 

                  • 6. Re: Value list from another file gives
                    philmodjunk
                       Does the reference value list use the "include only related values..." option? I'm speculating here that if that's the case and it refers to a table occurrence that doesn't exist in your current file's relationship graph, you'll get that error message.
                    • 7. Re: Value list from another file gives
                      KenS
                         Yes the referenced value list uses "include only related value ....". One of the tables did not exist in the current file's relationship graph. (you're ideas cooking along at this point) To test out the speculation I replicated the TO's into the current file and set up the same relationship (why not). And, it made no difference. Same error. Thanks for your speculation. It's a possibility that didnt occur to me. Maybe I'll try referencing another value list from that file and see if I can get more info on the problem. Ill try another value list on a different layout and a different field...
                      • 8. Re: Value list from another file gives
                        KenS
                           OK, so I added a new text field to a table for testing purposes only. Added that field to a different layout. And, created a new value list with an external reference to the "data" file's value list, this time a purely static list of items "home, work, cellular, skype, ...". That worked just fine. So, I switched it to use the original value list and it's back to the same error. So that would seem to eliminate file reference problems, layout/field problems. The primary difference is that the value list that works is a static list while the other is from fields in a  table including only related values.... hmmm, maybe try one that doesn't use "include only related values ..."  
                        • 9. Re: Value list from another file gives
                          KenS
                             So, adding to the test, a value list that is not based on "include only related" works just fine. Phil your idea seems to be the right direction, but..... what this means I dont know... any ideas anybody?
                          • 10. Re: Value list from another file gives
                            RickWhitelaw
                              

                            LaRetta wrote: 

                             

                            "You don't need to create another table occurrence at all.  A value list from another file is not dependent upon a relationship - only that the other file is referenced as an external data source."

                             

                            That's true and it's good to be reminded. However, so many of the great features of value lists (as used in drop-downs etc.) depend on a relationship existing. I always establish a relationship unless all I want is a set of values that won't change, which is exactly what's needed on occasion.

                             

                            RW 

                            • 11. Re: Value list from another file gives
                              LaRetta_1
                                

                              RickWhitelaw wrote:

                              However, so many of the great features of value lists (as used in drop-downs etc.) depend on a relationship existing. I always establish a relationship unless all I want is a set of values that won't change, which is exactly what's needed on occasion.

                               

                              RW 


                              What would the relationship be based upon?  A value list is just that ... a set of pre-determined entry options.  There may be no logical connection between the files at all. 

                               

                              I'm afraid I see absolutely no reason for creating a needless relationship (and wasting resources) when using a value list from another file. 


                              • 12. Re: Value list from another file gives
                                RickWhitelaw
                                  

                                In a multi-file solution a drop-down list from another file can be filtered by a relationship in the same way as using a value list from the same file. I should have qualified my comments with the "multi-file solution" scenario.

                                 

                                RW 

                                 

                                edit: We agree . . . I'm referring  to using values from the field of a related table which can be from another file if related. Of course using a value list "as is" can be done with an external file reference.

                                • 13. Re: Value list from another file gives
                                  tmack2
                                     <Unrelated Table> = Is there a relationship to this table?
                                  • 14. Re: Value list from another file gives
                                    philmodjunk
                                      

                                    When you select the "use only related values" you are actually referring to two table occurrences: the TO that serves as the source of values and your "starting from" TO that serves as the "filter" to control which values will appear when you next access the list. They both have to exist and the relationship between them must be valid. I don't know if referencing this type of value list can be made to work from an external file. You may have to redefine it in your current file. (I'd love to set up a sample file and play with this, but I've got too many alligators circling my ankles today...)

                                     

                                    This approach should work for you:

                                     

                                    Define a table occurrence in your current file that refers to the external file's table.

                                    Link it to the table occurrence that your layout uses with a relationship that will produce the conditional value list you want. (If you can get a portal on your layout to list the values you want in the list, you have a relationship that will work.)

                                    Now define a new conditional value list in your current file that specifies your external file's TO as the value source and your layout's TO as the "starting from" TO.