13 Replies Latest reply on Mar 14, 2012 4:27 PM by ClaudiuNemes

    Portal Problems

    ClaudiuNemes

      Title

      Portal Problems

      Post

      Hi there,

      I have problems displaying multiple rows in a portal. Let me explain the db structure.

      I have 2 database files: StudentsDB and MentorsDB.

      StudentsDB have a field called "Mentor" a pop-up menu that takes the "Surname" and "Name" (value list from another file) from MentorsDB.

      MentorsDB have a portal called "Mentored Students" that have to display students data like "Surname", "Name", "School" etc.

      In StudentDB I have no related tables.

      In MentorsDB I have a related table "Students" from StudentsDB and a join table "Mentored Students"

      So the table structure for MentorsDB is

      Mentors -> Mentored Students <- Students

      M_ID -> M_ID

                  S_ID <- S_ID

                  Surname <- Surname

                  Name <- Name

                  School <- School

      Well I think I try all possible combinations in order to display the mentord students in MentorsDB portal. Nothing seems to work. Could anyone give me some suggestions?

      Many thanks for your time,

      Yours,

      Claudiu Nemes

        • 1. Re: Portal Problems
          philmodjunk

          Can a student have more than one mentor? If they can only have one mentor, then you may not need the join table. Working with the join table, I suggest the following relationships in MentorsDB:

          Mentors::M_ID = MentoredStudents::M_ID

          Students::S_ID = MentoredStudents::S_ID

          Do not include Surname, name, or school in the relationship. Remove these fields from Mentored Students.

          On your Mentors layout, add a portal to MentoredStudents. Inside this portal, add the Surname, name, and school fields from Students into the Portal row and then you will have a portal that lists this information for each student mentored by the person in the current record on your Mentors layout.

          Here's a demo file of many to many relationships you can download and examine for examples of this basic setup and also for some more sophisticated ways you can implement an interface for working with many to many relationships:  http://www.4shared.com/file/dZ0bjclw/ManyToManywDemoWExtras.html

          • 2. Re: Portal Problems
            ClaudiuNemes

            Hi PhilModJunk

            Unfortunatelly this was the first version I try, 2 day's ago, when I start encounter the portal problem. I retest it now but it still not working. You could see this here


            http://www.claudiopolis.org/db/StudentsMentorsDB.rar

             

            Yes a student could have only one mentor. In fact the system is like this: 1 mentor could have from 1 to maximum 10 students. What I want is that on MentorDB-Main Layout to have a portal list of the Mentored Students.

             

            Many thanks for your reply and for your time,

            Yours,

            Claudiu


            • 3. Re: Portal Problems
              philmodjunk

              Yes a student could have only one mentor. In fact the system is like this: 1 mentor could have from 1 to maximum 10 students. What I want is that on MentorDB-Main Layout to have a portal list of the Mentored Students.

              Yes, but that doesn't fully answer the question as to whether or not you need the join table. For a given student is it every, in any way possible for that one student to have 2 or more mentors?

              but it still not working.

              If you describe what specifically is or is not working, I can suggest what you need to do to fix it. Re-reading your original post suggests that you may not have the correct value lists setup. Since your relationship is based on ID numbers like it should, the value list should have an ID number field specified for field 1 and a full name field specified for field 2. If your value lists are entering names, then your relationships will not work. Take a look at the demo file and use manage | value lists to see how the value lists used in the demo file work for linking a given event to a given contact.

              • 4. Re: Portal Problems
                ClaudiuNemes

                HI PhilModJunk

                I do as you suggest. Value list Mentors - first value "M_ID" and second value a new calculation field "Surname Name" (Surname & " " & Name).

                Still the same, not working.

                Let me try to explain once more

                In OSF REF Students.fp7, third tab (Scholarship Details), field  "Student Mentor" represent the mentor of the student.

                In OSF REF Mentors.fp7 "Mentored Students" portal I need a list (related records) of the students mentored by each mentor.

                Currently first 5 students are assigned to the 1st mentor and so on. Basically what I want, is to see in "mentors" portal how many students (normally 1 to 10) are mentored by each mentor.

                I have uploaded a new archive of the test with your last suggestion here http://www.claudiopolis.org/db/StudentsMentorsDB_2.rar

                Many thanks for your time,

                Yours,

                Claudiu

                • 5. Re: Portal Problems
                  philmodjunk

                  You've uploaded using RAR compression. I can't decompress them and the utilities I have located either are for sale or don't install successfully. Can you zip them instead and re-upload?

                  • 6. Re: Portal Problems
                    ClaudiuNemes

                    Hi PhilModJunk

                    Here's the zip file

                    http://www.claudiopolis.org/db/StudentsMentorsDB_2.zip

                    I also upload the 2 files separately

                    http://www.claudiopolis.org/db/OSF REF Mentors.fp7

                    and

                    http://www.claudiopolis.org/db/OSF REF Students.fp7

                    Many thanks,

                    Yours,

                    Claudiu

                    • 7. Re: Portal Problems
                      philmodjunk

                      I found this relationship in Manage | Database | relationship:

                      Mentors::M_ID X Students::S_ID

                      What should be defined is:

                      Mentors::M_ID = Mentored Students::M_ID

                      Students::S_ID = Mentored Students::S_ID

                      And there were zero records in Mentored Students. Thus, there are no records linking a mentors record to a students record.

                      The portal on Main Layout is set up to refer to students when it should instead refer to Mentored Students. And there should be no filter expression for this portal. The Students::S_ID field should be removed from the portal and replaced with Mentored Students::S_ID. I also enabled "allow creation of records via this relationship" for Mentored Students in the Mentors to Mentored Students relationship. Then I formatted the Mentored Students::S_ID field with a value list that listed Students::S_ID as field 1 and Students::cFullName as field 2. I defined cFullName as a calculation field that combined name and surname to look like this: Surname, Name.

                      Once I made those changes, I could use the portal on the main layout to select a student to show them as being mentored by the mentor whose record is current on the main layout.

                      I suggest taking a closer look at the demo file to see examples of these changes as what I did matches the design of what I call the "basic setup" in the demo file.

                      • 8. Re: Portal Problems
                        ClaudiuNemes

                        Hi PhilModJunk

                        Sorry for the zip archive. I send you the wrong set of files. There are so many try's! :))

                        I did exactlly as you suggest but nothing happens!!! I upload a new archive here (the good one this time)

                        http://www.claudiopolis.org/db/StudentsMentorsDB_3.zip

                        It contains all the suggestions you made but I could not see the mentored students in the portal. It never crosses my mind that working with portals could be so complicated. I'm not an FM expert but I always succeed to build DB's with FM. This time I'm stucked big time...


                        Many thanks for your time,

                        Yours,

                        Claudiu

                        • 9. Re: Portal Problems
                          ClaudiuNemes

                          Hi PhilModJunk

                          Many thanks for your support but I manage to solve the portal problem in an easier manner.

                          I'll upload soon the archive in orer to look at it if you're interested.

                          Many thanks for your time,

                          Claudiu

                          • 10. Re: Portal Problems
                            philmodjunk

                            A) you do not have any records in mentored students. Therefore there are no records to list in the portal to mentored students.

                            B) the Mentored Students::S_ID field in the portal is not formatted with a value list for selecting a student.

                            Once I make format that field as a drop down list, I can create records in the join table by selecting students from this drop down and the data about them appear in the portal each time I select a student.

                            • 11. Re: Portal Problems
                              ClaudiuNemes

                              Hi PhilModJunk,

                              Here's what I want. To simply display the mentored students (selected only in StudentsDB because there will be 1000 students and aprox. 100 mentors) into the Mentors portal.

                              http://www.claudiopolis.org/db/StudentsMentorsDB_4.zip

                              Anyhow I solve the error I've made according to your suggestions and it works also from mentors to students, maybe I will let this too but as I say there will be a lot of students.

                              Many thanks for your suggestions and for your time,

                              Have a great day,

                              Yours,

                              Claudiu

                              • 12. Re: Portal Problems
                                philmodjunk

                                Since the list of mentors is likely to be much smaller than the list of students, I'd create records in Mentored students in a portal to mentored students from a students layout. You'd have to implement several features in reverse--such as enabling "allow creation" in the student to mentored student relationship and replace Mentored Students::S_ID with Mentored Students::M_ID and format it with a  drop down list of Mentors instead of students.

                                There are also script supported alternatives for working with long lists of values. This demo file illustrates several such approaches:

                                http://www.4shared.com/file/plr_jbkk/EnhancedValueSelection.html

                                • 13. Re: Portal Problems
                                  ClaudiuNemes

                                  Many thanks for everything Phil,

                                  Have a great day,

                                  Yours,

                                  Claudiu