1 2 3 Previous Next 33 Replies Latest reply on Sep 26, 2014 4:22 AM by bruns

    Portal relationship



      Portal relationship


      I have a table called equip_land which has equipment number and type and so on.  Example could be equipment number 12345 Type Dozer , this Dozer could have several pieces of equipment that are compatible with it like tracks and blades.

      So I het up another table called attachments so I could put a portal on the equip_land layout so I can list all of the attachments that go with that Dozer.  I then put a button there to go to related record, generally I can do this however this time the attachments are records also on the equip_land table and I cannot get it to go to related record.  Enclosed is the relationship.  Thanks


        • 1. Re: Portal relationship
          /files/b16a3d0971/Capture1.PNG 1167x604
          • 2. Re: Portal relationship
            /files/b942a2e277/Capture2.PNG 522x392
            • 3. Re: Portal relationship

              Let me see if I can explain what I am trying to do a little better.

              On the land equipment table I have records for all of our land equipment.  This includes attachments and everything.  So on the record, 1234 which might be a dozer, I would like a portal that I can list all of the attachments that are compatible with that dozer.  On the record 4567 which could be tracks, I would like to list that dozer in the portal and a button that would take me back and forth between those pieces of equipment using the equipment_land layout.  Hope that helps and thanks to anyone that can help.

              • 4. Re: Portal relationship

                From what I can see here, the "table" specified in Go to Related records should be attachment_land, not Equipment_Land.

                • 5. Re: Portal relationship

                  I can choose that but where it says Show record using layout, it will not let me choose the equipment layout

                  • 6. Re: Portal relationship

                    Is the above the best way to go about what I am trying to do?

                    • 7. Re: Portal relationship

                      I should have noticed this before. Attachment_Land is not a table occurrence that shares the same data source table as Equipment_Land and thus you can't pull up those records on the equipment layout as they aren't in the same table. You need to specify a layout based on Attachment_Land in order to see records from Attachment_Land in the way you've requested here. But this need not be the case. You can modify your database design to make Attachment_Land a second table occurrence of the same table as Equipment_Land.

                      And since you are matching one record in Equipment_Land to many records in Attachment_Land, you should be matching the pk field of equipment_land to the fk field of attachment_land. (And if one attachment record needs to be linked to many equipment records, you need a join table in order to set up a many to many relationship.)


                      • 8. Re: Portal relationship

                        All pieces of equipment have equipment numbers, and all records with equipment numbers are in the equipment table, is there a way to list attachments (they also have equipment numbers from the equipment table) and toggle back and forth between the 2 pieces of equipment?


                        Thanks Phil

                        • 9. Re: Portal relationship

                          Certainly, you just can't use the same layout for this given your current data model (tables and relationships).

                          One option is to put all records for equipment and attachments in the same table--treating attachments as another type of equipment. A "self join" relationship can then link an equipment record to its list of attachment records.

                          The other option is to keep the attachments in the separate table like you have now and use a different layout for displaying attachment records when you want to see a "detail view" of one of the attachments for a given piece of equipment.

                          • 10. Re: Portal relationship

                            Your Comment: One option is to put all records for equipment and attachments in the same table--treating attachments as another type of equipment. A "self join" relationship can then link an equipment record to its list of attachment records.


                            You are correct, That is what I was trying to explain, I do have all equipment and attachments in the same table, How would I setup the self join.  Sorry I didn't explain it better.

                            • 11. Re: Portal relationship

                              But you don't have them all in the same table and this is what I have been trying to point out to you. I can see that you don't in your screen shot. If they were in the same table, Attachment_Land would list the same fields as Equipment_Land in the screen shot you posted of your relationship details.

                              • 12. Re: Portal relationship

                                I am probably still not explaining it very well, In the screen shot is shows Attachment land because that is what I thought I needed to make a portal so I made a new table called Attachment land.  But, all equipment is recorded in the equipment table, the only fields in Attachment Land is pkid and fkid.  I like your option one but not sure how to make the self join, I believe it is with X but which fields do I match up, if that is right.  Sorry for the confusion (or maybe I am still confused).

                                • 13. Re: Portal relationship

                                  Ok, Then you can remove the Attachment_Land table from your database as it will not be used.

                                  But this key question must still be answered. Does the same attachment record need to be linked to more than one equipment record? For example, could the same record for a "Blade" need to be linked to more than one "Dozer"?

                                  • 14. Re: Portal relationship

                                    Yes, a record for a particular blade could be linked to several dozers, and vice verse several dozers could be liked to a particular blade.

                                    1 2 3 Previous Next