7 Replies Latest reply on Nov 10, 2009 4:47 PM by littledrew_1

    Portals and Conditional Value Lists

    littledrew_1

      Title

      Portals and Conditional Value Lists

      Post

      I have 2 tables, ::shows and ::projects. These are joined by ::play log. (Many to Many relationship obviously) In ::projects there is the "title" field and  "segment" field.

       

      I have a portal in the "Show" layout that has a portal for ::play log. Play log has a related foreign key field to projects. What i'm trying to do is having 2 drop down's in the portal. The first for "segments", the second is a conditional list for "titles". Just think of segments as types. I want to filter "titles" by the selected "segment." I followed the tutorial for creating conditional value lists, i can get that to work just fine . But when i try to set up things in the portal, nothing seems to work. Any ideas as to what could be the problem?

        • 1. Re: Portals and Conditional Value Lists
          philmodjunk
            

          We need more details:

           

          What table stores Segments and Titles for your value list?

           

          Exactly what options did you select in your value list?

           

          What relationship links your "Starting From" table occurrence to your table of related values?

          • 2. Re: Portals and Conditional Value Lists
            littledrew_1
              

            the table "projects" contains the segments and titles fields.

             

            For the segments value lists, i selected the field of the same name from the projects table.

             

            For the titles value list I selected the foreign key field in the play log table, and related records from the "play log".

             

            I realize that the segments value lists refers to the projects table and the Titles value lists refers to play log, but, they're all related.

             

             

            Also, the Segments value list can be hard coded, because the values there are pre-defined and won't change.

             

             

            If it still doesn't make sense i could upload the file.

             

            • 3. Re: Portals and Conditional Value Lists
              philmodjunk
                

              Things are still not clear. An upload to a share site with a link posted here would probably save a lot of explanation.

               

              I don't think you have the relationships you need in order to use a relationship to filter your value list but don't have a clear enough picture to be sure.

               

              Here's the part that's not clear:

               

              For the titles value list I selected the foreign key field in the play log table, and related records from the "play log".

               

              For a join table facilitating a many to many relationship, you should have two foreign keys--one for each of the other two tables and you don't tell me which is which.

               

              You appear to have Three tables, not two with the following relationships:

              Projects:: ProjectID = PlayLog:: ProjectID

              Shows::ShowID = PlayLog::ShowID

               

              Apparently "Title" is either PlayLog::ShowID or PlayLog:: ProjectID? 

              • 4. Re: Portals and Conditional Value Lists
                littledrew_1
                  

                thanks

                 

                http://home.comcast.net/~littledrew/fp/USBD2.fp7

                 

                The Portal in question is in the "shows" layout in the "segments" tab

                • 5. Re: Portals and Conditional Value Lists
                  littledrew_1
                     for that version, i changed the "segments" value list to a static one.. but normally it referred to the projects table then the segments field
                  • 6. Re: Portals and Conditional Value Lists
                    philmodjunk
                      

                    I see two problems. As I suspected, you didn't have a relationship that you could refer to in order to filter your list of project titles by selected segment. But your portal/table/relationship set up also won't allow you to create a new record in the portal by first selecting a segment.

                     

                    I added a new field "segfilter" to your table. You may be able to use "Segment lookup" instead, but I added a new field to avoid affecting any current use to which you might be putting that field.

                     

                    Then I defined a relationship:

                    PlayLog::SegFilter = ProjectsBySegment::_Segment

                    (to create ProjectsBySegment, select Projects, click the button with two plus signs and rename the new table occurrence this creates.)

                     

                    In your portal, replace Projects::Segment with Playlog::SegFilter

                     

                    Open the Projects value list and specify the fields as coming from ProjectsBySegment instead of Projects.

                    Click the "Show only related values starting from" option and select PlayLog as the "starting from" table.

                     

                    Now you should be able to select a segment and see just a list of matching projects with the same segment name in the next drop down (combo box).

                    • 7. Re: Portals and Conditional Value Lists
                      littledrew_1
                        

                      wow perfect. thank so much! I guess i should do more research into table occurances.

                       

                      (wish those Lynda.com tutorials went into this much depth...)