8 Replies Latest reply on Feb 29, 2012 9:46 AM by OmarRangel

    Portals To Portals

    OmarRangel

      Title

      Portals To Portals

      Post

      Hi:

      I have a portal with many rows, there is an ID for each row And a botton for each id, my portal is within tab control with 2 tabs and i want to pass from the first tab to the other tab with a script through the my botton.

      I hope you can help me..

        • 1. Re: Portals To Portals
          philmodjunk

          And what should be seen on that second tab when the button is clicked?

          Is the button to be located inside the portal row so that clicking the button selects that portal record?

          What are the relationships involved between the layout's table, the portal on tab one and the portal on tab two?

          • 2. Re: Portals To Portals
            OmarRangel

            I have a container field in the second tab to insert images or files when the button is clicked from portal from the first tab....

            • 3. Re: Portals To Portals
              OmarRangel

              I have three tables Related (FirstTable) (SecondTable) (ThirdTable) my portal have fileds from the (SecondTable) and is located in the layout of the (FirstTable)

              And the container field is also in the FirstTable layout but in the seccond tab of the tab control

              • 4. Re: Portals To Portals
                philmodjunk

                I'm not clear on what you want the button to do. To just change tabs you can click the tab itself.

                What is the connection between the records in the portal and the inserted images?

                • 5. Re: Portals To Portals
                  OmarRangel

                  If i click the button on the left side of the portal that is located in the tab "Seguimiento" has to send me to the second tab "Imagenes" where is the container field...

                  • 6. Re: Portals To Portals
                    philmodjunk

                    Apologies Omar, My last post was made before your screen shots and added explanations appeared in the forum.

                    What I don't know at this point is the relationship you used to link FirstTable(layout's table) to SecondTable(portals).

                    We'll need to either add a new relationship for that second tab or use a filtered portal to get what you want on the second portal and knowing the current relationships provides some of the needed details to set that up.

                    I'll take a try at sketching out one possible solution, but you'll need to replace my field names with those actually defined in your tables:

                    In layout mode, select the second tab and use the Name box on the inspector's position tab to give it an object name. I'll name it "imagenes" to match the tab label. This enables us to use go to object to select the imagenes tab panel and bring it to the front.

                    Define a new field, gSelectedImageID in FirstTable and specify global storage in field options.

                    In Manage | Database | relationships, make a new table occurrence of SecondTable by clicking it and then clicking the duplicate button (2 green plus signs). You can double click the new occurrence box to get a dialog to appear where you can rename the new occurrence box as "SelectedImage".

                    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:

                    FirstTable::gSelectedImageID = SelectedImage::__pk_SecondTableID

                    Now go to your imagenes tab panel and replace your current container field with the container field from SelectedImage. (keep in mind that SelectedImage is still a reference to SecondTable. It just uses a different relationship.)

                    Have your button perform this script:

                    Set Field [FirstTable::gSelectedImageID ; SecondTable::__pk_SecondTableID]
                    Go to Object ["imagenes"]

                     

                    • 7. Re: Portals To Portals
                      philmodjunk

                      Note:

                      __pk_SecondTableID is my name for the field you use in SecondTable to uniquely identify each record in the table. It should be an auto-entered serial number for that reason.

                      • 8. Re: Portals To Portals
                        OmarRangel

                        OK let me try it.... I´ll tell you if it works thank you Phil