5 Replies Latest reply on Jan 1, 2012 9:34 PM by BFCSteve

    Value List not updating when coming from fields

    BFCSteve

      Title

      Value List not updating when coming from fields

      Post

      I am using FM Pro 10.0v3 and have encountered something I don't understand.  My instinct is to call this a bug, but perhaps it's just another example of incomplete documentation steering me wrong?

      In File One I have two fields.  Field A specifies a category and Field B dynamically shows a popip with options relevant to the chosen category.  File Two has a table which stores a copy of Field A (Global) and another table which contains Field C to match against the value in Field A and Field D to store the dynamic values to display in Field B.  In File One I have a value list setup which setsup the relationships necessary to make this happen.

      In File Two I have the following values in Field C and Field D:

      Apple -> Red

      Apple -> Delicious

      Apple -> Fruit

      Brocoli -> Green

      Brocoli -> Nasty

      Brocoli -> Vegetable

       

      When I set Field A to "Apple" the values in Field B should be "Red, Delicious, Fruit".  If I set Field A to "Brocoli" I should see "Green, Nasty, Vegetable" in Field B.

      Instead, what happens is the values for Field B remain the same no matter what I put into Field A *until* I add or delete a record in the table in File Two which contains Fields C and D.  Meaning, if I set A to "Brocoli" the values in Field B don't change from whatever was already there.  However, if I add a record to File Two's table with Fields C and D the values in Field B instantly change and correctly show the values for Brocoli.

      What's going on here?

      Steve

        • 1. Re: Value List not updating when coming from fields
          philmodjunk

          All those letters are making my eyes cross. Using actual names is much easier to follow....

          I can deduce the following from your original post:

          File 1
             Field A--category
             Field B--pop up

          File 2
             Table1::Field A "Copy"??
             Table2::Field C --- match to File1::FieldA
             Table2::Field D--Values for Field B pop up

          What you are trying to set up is called a conditional value list. As shown above, I only have an incomplete picture of what you have set up. The key is to have the correct relationship on which to base your conditional value list.

          I'm going to restructure and re-label the above info so that it makes sense for me. Feel free to respond with questions if it does not match what you need to have in your database system.

          Table1: FruitsVeggies
          Table2: FVProperties

          FruitsVeggies::Category(fieldA) = FVProperties::Category(FieldC)

          Define your valuel ist for FruitsVeggies::Property(fieldB) to list values from

          FVProperties::Property(FieldD)

          Specify Include only Related Values, starting from FruitsVeggies.

          Here's some documentation on the subject:

          Forum Tutorial: Custom Value List?

          Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list

          Demo File: http://www.4shared.com/file/f8NsU2DJ/ConditionalValueListDemo.html

          • 2. Re: Value List not updating when coming from fields
            BFCSteve

            Thanks for the quick response.  As far as I can tell, that's exactly what I'm doing.  I'm going to take youre renaming (good idea) and see if I can calrify it further:

            User Interface (File 1)

              FV_Choice (user specification of fruit or vegetable)

              FV_Rating (popup of fruit or vegetable properties based on FV_Choice)

             

            Data File (File 2)

              Table 1

                FV_Current_Type (Global field to store FV_Choice)

              Table 2

                FV_Types (matching field to FV_Current_Type in Table 1)

                FV_Properties (properties of all fruits and vegetables)

             

            The end user makes a new record and sets FV_Choice.  A script is triggered to take the value of FV_Choice and put it into FV_Current_Type.  There is a relationship setup in the User Interface file that establishes a connection between FV_Current_Type and FV_Types.  In the User Interface file I have a Value List popup setup for FV_Rating which uses this relationship to display values from FV_Properites as determined by FV_Current_Type (which is set by FV_Choice).  

            From experience it if the relationship isn't setup correctly then you get completely bogus data or none at all.  Or just the first record seen.  In my case I'm getting FV_Properties to correctly list themselves in FV_Ratings, but only if I either add or delete a record in Data File's Table 2 layout.  Which is what has me puzzled.

             

            Steve

             

             

            • 3. Re: Value List not updating when coming from fields
              philmodjunk

              You appear to have one more field than you need and it would appear to be the source of your trouble.

              Since you have a data separation model,Table 1::FV_Current_Type should be defined in the following relationship:

              Table 1::FV_Current_Type = Table 2::FV_Types

              Table 1::FV_Current_Type should be formatted as your drop down list of types. FV_Rating should be defined in the same table and its value list should be defined to list FV_Properties from Table 2, include only related values starting from Table 1.

              The data separation could also be the problem. Occurrences of both Table 1 and Table 2 and the above relationship need to exist in the interface file in order for the value list, defined in the same file, to function correctly.

              Note that there is no use for FV_Choice in the function of this value list.

              • 4. Re: Value List not updating when coming from fields
                BFCSteve

                Thanks for the prompt answer!  I've been crushed under the weight of the Holidays' demands, so I am only now just getting back to this.

                Looking at what you say makes sense to me except for one point.  And this is the reason why I had it set up with FV_CHOICE in the first place.  Please indulge me for one more round of help as I can't get my head around this particular issue.

                It seems what you're saying is I need to have everything setup in a single file.  Specifically:

                 

                Data File (File 2)

                  Table 1

                    FV_Current_Type (Global field to store FV_Choice)

                    FV_Rating (popup of fruit or vegetable properties based on FV_Current_Type)

                  Table 2

                    FV_Types (matching field to FV_Current_Type in Table 1)

                    FV_Properties (properties of all fruits and vegetables)

                 

                And from this establish a relationship Table 1::FV_Current_Type = Table 2::FV_Types with FV_Current_Type being setup to have a popup with the valid type choices which may be found in FV_Types.  FV_Rating should then be setup to be a Value List displaying only the related values starting from Table 1.

                If I have this correct, it doesn't do what I need it to do as is :-(

                I really need the data stored in a File 1.  File 2 is simply a repository for various choices which are accessible by several other files.

                Hmmm... actually, I guess I could set up a script to transfer the data from temporary fields in File 2: Table 1 to permanent fields in File 1: Table 1.

                In any case, I thank you for your help and hopefully I'll get this working later on tonight.

                 

                Steve

                 

                P.S.  I don't want to waste an opportunity to complain about FileMaker overriding sort orders for things displayed in dynamically assembled Value Lists.  It seems unnecessary and definitely annoying.  There, just had to get that off my chest :-D

                • 5. Re: Value List not updating when coming from fields
                  BFCSteve

                  Ah, never mind!  I see where I was going wrong.  Man this stuff can get confusing sometimes.  I've got it up and working to my liking now!!  Thanks!!

                   

                  Steve