8 Replies Latest reply on Oct 15, 2009 11:19 AM by mrvodka

    ValueList Problems

    MikeyG79

      Title

      ValueList Problems

      Post

      FM10A

      I have a MySQL table with values I'd like to use in a valuelist. So in one FM file, I have that configured and it works. (Valuelist created from the MySQL table, showing only related values.)

      When I try to use that list in a different FM file, it doesn't work.

      Is this a limitation of valuelists that show only related values? 

        • 1. Re: ValueList Problems
          MikeyG79
            

          Just did a test, if I remove the "related values only" option, using the valuelist in another file works fine (lists all the records in the MySQL table)

          when I re-select the "related values only" option, it no longer works. 

          • 2. Re: ValueList Problems
            mrvodka
               From the context of the second file, how will it know what the related values are?
            • 3. Re: ValueList Problems
              MikeyG79
                 From the file where the valuelist resides.
              • 4. Re: ValueList Problems
                mrvodka
                  

                I think you are missing my point. Unless you are on a layout in File2 that is basing off the data in File1, then how would it know what the relationship is in your first file?

                 

                Perhaps you should go into more detail on what you are trying to achieve and more specifically all the relationships that are involved.

                • 5. Re: ValueList Problems
                  MikeyG79
                    

                  MySQL Table - one field with the data, one field with the type

                   

                  I need to make a valuelist out of each type. This has to be stored centrally in my "Valuelist" file for use in many other files.

                   

                  FM field points to the MySQL field, FM field has the type contained in it.

                  valuelist built from the type field in the MySQL table, but only shows related values (that's where having the type in the FM field comes into play) 

                   

                  It works fine in my ValueList file, but not when I reference it from other files. Don't know how else to do it. 

                  • 6. Re: ValueList Problems
                    mrvodka
                      

                    What I am saying is how will the other files know that the valuelist file is filtered?

                     

                     

                    Type --< ESS Types

                     

                    So for names, your list would return lets say Jim, Bob, Susan, and Mary

                    The filtered value list works fine.

                     

                     

                    However now you want to use that value list based on names in your Class file. Well, there is no way for the Class file while being on the class layout to look the table in type. Its no longer related. That is why its not working. rom the class layout, it is looking for the filtered list which is supposed to be based on the relationship in the valuelist file. Type --< ESS Type.

                     

                     

                    Why dont you just create the relationship in each of your files?

                     

                    • 7. Re: ValueList Problems
                      MikeyG79
                        

                      Because of the shear number of relationships, it's not like 10 or 20... and it's an inherited "solution" so I don't know exactly where all the lists are used.

                      • 8. Re: ValueList Problems
                        mrvodka
                           Well considering that you have FMP10, you could possibly use one global text field and have that key with one relationship to the MySQL table. Then using a script trigger, you can set the global field each time with a differnt value for the differnt type of value list you want.