4 Replies Latest reply on Sep 30, 2013 7:23 AM by jrobgk1

    oddity with a conditional value list : help?

    jrobgk1

      Title

      oddity with a conditional value list : help?

      Post

           Greetings.  

           I have a join table, Event Records, that all information for a given promotional event is recorded.  In this event record, i have a foreign key for a DistributorID and a SalesRepID which are needed to capture the third party employee information.  i need to create a VL where a distributor is chosen, and a list of possible reps is populated in another CVL.  Currently, i have the following relationships set up:

           EventRecords::DistID >--< Reps::DistID    and EventRecords::RepID>--<Reps::RepID

           the first VL is from a TO of Reps_Distributors, the CVL is from Reps__repData

           It's not populating as I would expect it to, in that i get the VL, but the CVL either populates with one option, or says No Value Defined.  

            

           What am I missing?

           jesse

        • 1. Re: oddity with a conditional value list : help?
          philmodjunk

               EventRecords::DistID >--< Reps::DistID    and EventRecords::RepID>--<Reps::RepID

               the first VL is from a TO of Reps_Distributors, the CVL is from Reps__repData

               There seems to be something missing here. The table occurrence names you indicate as the source of values for your value lists do not appear in the relationships that you have also posted.

               Assuming that you have this relationship:

               EventRecords::DistributorID = Reps|Distributor::DistributorID

               Then then the filtering value list can be set up on EventRecords::DistributorID to list distributor names and IDs with the ID field as the primary field and the name as the secondary field. Any table occurrence that refers to your table of distributors will work.

               Then your second value list, the CVL, would list values from Reps|Distributor, with "Include only related values, starting from EventRecords" specified.

          • 2. Re: oddity with a conditional value list : help?
            jrobgk1

                 Phil - 

                 thanks for the response.  I have all of the data in one table: Representatives, with fields:

                 DistID
                 Distributor
                 RepID
                 RepName
                 RepCell
                 Etcetera...

                 So, to make this work, i would need to scrap my current setup and go with:

                 EventRecords::DistID >--<Reps::DistID  AND EventRecords::RepID>--<Reps::RepID in one relationship?

            • 3. Re: oddity with a conditional value list : help?
              philmodjunk

                   So if you double click the relationship line, you see:
                    

                            EventRecords::DistID = Reps::DistID
                    AND EventRecords::RepID = Reps::RepID

                   If so, this won't work for your conditional value list.

                   In Manage | Database | relationships, make a new Tutorial: What are Table Occurrences? of Reps by clicking it and then clicking the duplicate button (2 green plus signs). Double click the new occurrence box to get a dialog to appear where you can rename the new occurrence box to be. RepsByDistributor

                   We have not duplicated a table. Instead, this is a new reference to the same table already present in your database.

                   Add it to your relationships like this:

                   EventRecords::DistID = RepsByDistributor::DistID

                   Now you can set up your value liist to list values from RepsbyDistributor, include only related values starting from EventRecords.

              • 4. Re: oddity with a conditional value list : help?
                jrobgk1

                     Ok.  so one more value list wrinkle.  I am working on a solution where a client wants to see a list of types of machines, then select a specific machine (for maintenance) and then a list of common issues that machine would have for the mechanic to select from.

                     I have a table of Assets (which are all of the machines) that also has a field for MachineType as well as MachineName

                     I have a table of Common Issues which has a field for MachineType and MachineIssue

                     I am able to get the value list to create on the relationship for selecting a machine type, and getting the corresponding issues, but I am having trouble getting the list of machines that correspond to the type to create and filter.