5 Replies Latest reply on Aug 23, 2010 10:07 AM by philmodjunk

    Adding a Conditional Value List to existing Layout

    basilisk2

      Title

      Adding a Conditional Value List to existing Layout

      Post

      A little while back I got a great tip here that suggested using a Conditional Value List (CVL) to make it easier to choose selections in PopUp menus where the values available in Field2 depend on the selection made in Field1. So I tried doing this in my portal that uses a Many to Many relationship for part of the info (http://forums.filemaker.com/posts/4a8454cc40) but although I eventually worked out a way to get the CVL working, the other fields started misbehaving.

      After entering data for the first two fields, each non-CVL field from Holdings in the 

      Client --< Holdings >-- ChosenFundName >--< AllFundNames

      relationship shows the same info for every record. Am I trying to do something that isn't possible, or am I doing it the wrong way?

      TIA

        • 1. Re: Adding a Conditional Value List to existing Layout
          philmodjunk

          We need more detail. I checked the other thread and this info isn't there either:

          What fields are used in the above links?

          What field is set up with the CVL?

          How is the CVL setup?

          • 2. Re: Adding a Conditional Value List to existing Layout
            basilisk2

            OK, I've managed to strip out all the irrelevant practice work and finished layouts to arrive at the bare bones of what won't work, just for clarity's sake... you can download the fp7 file here:

            files.me.com/themacfamily/x5rd6g

            Thanks for helping!

            • 3. Re: Adding a Conditional Value List to existing Layout
              basilisk2

              If you need any more info, please let me know. I based the CVL on that from the knowledge base article that creates 2 identical tables "Menu" and "Orders". It didn't explain what would happen if new fields were added to either of those tables (or which table to add to). In fact, applying the technique is left to pure guesswork as far as I can see... which is how I ended up in the mess I'm in.

              • 4. Re: Adding a Conditional Value List to existing Layout
                basilisk2

                The problem is in the FundTestCopy layout which is based on Table:dClients which contributes one field <dClients.Client Name> to the main screen. The Portal is based on Table:dFunds.

                The first Portal field is <dFunds:FundCo> and uses a Popup menu based on Value List AllFundCos which looks up the data in Field <dAllFunds.FundCo> set to "Include All Values".

                The second Portal Field is <dFunds.FundName> and uses a Popup menu based on Value List AllFundNames which looks up the data in <dAllFunds.FundNames> set to "Include only related values starting from - dFunds".

                The third Portal Field is <rHoldings.Quantity> which is an Edit box.

                The fourth Portal Field is <rHoldings.Value> which is an edit box.

                The Conditional Value Lists work great, but the fields from rHoldings seem only to record one set of data. When you enter the data for the second record it changes the data in the first record to be the same as the second record. Enter a third set of data, and this data then becomes the data for all three records.

                Where am I going wrong? This might be a more complicated construction than the one in the Knowledge Base, but ideally I'd like it more complex still, so that the Value field is a calculated field taking info from other tables yet to be added. I'd settle for this set up working first of all though...

                • 5. Re: Adding a Conditional Value List to existing Layout
                  philmodjunk

                  Nothing wrong with your value lists. I believe LaRetta has already shown you where the problem lies here (Portal is based on wrong table occurrence to support the many to many relationship). So I'll leave it at that and you can post back with questions if you have any.