6 Replies Latest reply on Mar 30, 2012 3:50 PM by imartinez

    Portal first row will not display outside layout mode

    imartinez

      Title

      Portal first row will not display outside layout mode

      Post

      I am a beginner on Filemaker and I am having trouble viewing my data between relational tables using a portal.

      I created a relationship between my Vendortable (pkVendorID) and my Vendor # of VisitsTable (fkVendorID).

      On my Vendor table Layout I drew in my portal and I selected the field from Vendor # of Visits Table, careful to make sure that the fields fit exactly in the first row. When I save my chnages and exit layout mode I cannot see the fields appear in the 1st row when I am in Browse mode. 

      I have tried moving the fields into the second row (in Layout mode) and I can see them appear (in Browse mode) but the data from the related table is not displayed. 

      I also went into Manage Data and selected the relation between the 2 tables and Selected the "Allow creation of records in this table via this relationship" under the Vendor # of visitsTable. It allows me to write new records from my VendorTable to my Vendor Visitor table, but I cannot see the records I create in my Vendor Visitor table. 

      So it appears that the relationship exists but only in one direction. 

      Can anyone help with why the data would not be appearing? Is there some attribute I should be selecting when creating a relationship? Thanks.

       

      Layout_and_Browse_Mode.jpg

        • 1. Re: Portal first row will not display outside layout mode
          philmodjunk

          I created a relationship between my Vendortable (pkVendorID) and my Vendor # of VisitsTable (fkVendorID).

          On my Vendor table Layout I drew in my portal and I selected the field from Vendor # of Visits Table,

          Layouts and portals do not refer directly to tables. Instead, they refer to table occurrences--the "boxes" located in Manage | Database | Relationships and that are used to define the relationships linking the tables in your database. "Show Records From" in Layout setup determines the selected table occurrence for your layout and "Show Related Records From" in portal setup determines the table occurrence for the portal.

          The relationship(s) that link these two occurrences then determine what related records, if any appear in the portal. If you have created records in the portal's table elswhere in your database and they do not appear in the portal, then something is missing--such as data in a field used in the relationship or a record in an intermediate "join" table does not exist.

          What's of immediate concern here is that your screen shot shows that your portal uses a table occurrence named "ColdCallLog", yet the above quote describes adding fields from  "vendor # of VisitsTable". When you select a field in the portal row while in layout mode, do you see "coldcallLog::fieldName" or Vendor # of VisitsTable::FieldName in the Display Data From box on the inspector's data tab? It is possible to add fields from other table occurrences to a portal row than the one listed in "show related records from", but in those cases the relationship between any related records in ColdCallLog to the records in that different table occurrence will control whether or not anything appears in the portal.

          If after reading through all that, you still can't figure this out, you might capture a screen shot of the relevant portion of Manage | database |Relationships and upload that so that we can compare it to what you have set up for your layout.

          • 2. Re: Portal first row will not display outside layout mode
            imartinez

            Thanks for your quick reply.

            I reviewed your response and I think I have the information set-up correctly. In my previous post I incorrectly referenced the Tables with the text title I wrote in my layout. The tables I have are ColdCallVendor and ColdCallLog. I only have the 2 tables set-up. FYI... this is my first database. 

            I have included a screen shot of the Manage Database Realtionships, a screen shot of the information I specified in the portal set-up, and a screenshot of my ColdCallLog layout.

            For the _fkVendorID in the ColdCall log layout I am using a dynamic list to select the VendorID from the ColdCallVendor table. By doing this, is it possible that the relationship is going in only 1 direction?  I am having no trouble selecting a Vendor from my ColdCallLog table but the portal does not seem to recognize that I selected the VendorID in the first place.

            Hopefully you will be able to see where my folly lies. 

            Thank you. 

            • 3. Re: Portal first row will not display outside layout mode
              philmodjunk

              That's an execellent screen shot. It answers a lot of questions. It looks to be set up correctly as far as I can see. That doesn't explain why your portal does not show the records you expect to see. Since the portal and layout appear to be correctly set up, we have to take a closer look at the few details that are not visible in that screen shot.

              Let's take a closer look at that field where you select a vendor number. Best guess is that this popup menu is either entering a value in the wrong field or is entering the wrong value and thus no link is established to an existing record in ColdCallVendor. If you click this field while in layout mode, what do you see in DisplayDataFrom in the top of the Inspector's data tab? You should see: ColdCallLog::__fkVendorNumber. If you open manage value lists, find the value list for this pop up menu and click edit, then click Specify..., what options do you see for its value list?

              • 4. Re: Portal first row will not display outside layout mode
                imartinez

                The "Display Data from" states ColdCallLog:__fkVendorNumber

                In my dynamic list I am specifying to Display the CompanyName instead of the __pkVendorNumber??? 

                Please see my screen shot for details. 

                 

                • 5. Re: Portal first row will not display outside layout mode
                  philmodjunk

                  And that's the problem. It thus enters the name into this field and that value will not match the vendor number value of any records in the related table. Modify your value list to list __pkVendoerNumber in the first field box, the click the "also dislay values..." check box and select CompanyName for the second field. Now you will be able to see the vendor name when making a selection, but the value list will enter the ID number and correctly link your calllog records to a record in the vendor table.

                  Please note that this is the simplest way to set things up. It's not the only method. If you deal with a large number of vendors, you may find that this value list is too long to use easily. If that happens, there are other approaches that make the long list of vendors easier to work with.

                  • 6. Re: Portal first row will not display outside layout mode
                    imartinez

                    I would have never thought....

                    Thank you so much for your help! It works!!!

                    If the list becomes to cumbesome in the future I know where to come for help on that!