7 Replies Latest reply on Apr 27, 2011 3:31 PM by philmodjunk

    Portal Row pop-up

    DomMolloy_1

      Title

      Portal Row pop-up

      Post

      I have a portal that show the most commonly used data in a table. Think of it as a table of tasks. Sometime the tasks are recurring and I'd like to capture the recurrence data by adding a pop-up that is activated by a button on each portal row. I need help getting this to work. The problem is that if I hit the button on row 3 and launch the pop up the data that is updated in the pop-up seems to always be the first record in the portal even if I use the goto portal command. Before launching the pop-up. Ideas? I've tried a bunch of things and it seems to me that even if I to get to third record in portal (at least make it at the active row) a change to a field on that portal row done within a script it does not work. Is this just a limitation or am I just going after this ass backward.

        • 1. Re: Portal Row pop-up
          philmodjunk

          To repeat the same question I asked yesterday, what are you using for your "pop up". New Window or Show Custom Dialog?

          • 2. Re: Portal Row pop-up
            DomMolloy_1
            New window. Sorry I missed your reply yesterday.
            • 3. Re: Portal Row pop-up
              philmodjunk

              For the layout to use in new window, base it on the portal's table.

              Use Go To Related Record with the new window option to open your pop up and go to the related record of the portal all in one step.

              If you can add new records in your portal, you may want to do it this way in your script:

              If [ Not isEmpty ( PortalTableOccurrence::ForeignKey ) ]
                 Go To Related Records ( ....
              End IF

              That way the GTRR step only happens if there is a related record.

              • 4. Re: Portal Row pop-up
                DomMolloy_1
                Brilliant!  Now - I need you to help me replace all the hair I pulled yesterday;) Seriously - it is amazing to have someone like you that is willing to answer all these newbie questions. Thank you so much! I'm sure we'll be talking again soon.
                • 5. Re: Portal Row pop-up
                  philmodjunk

                  There are also scripting tricks that can keep that pop up "modal" so that they can't click on the main window and lose the pop up back behind it.

                  The key is this infinite loop:

                  Allow User Abort [off]
                  Loop
                     Pause/Resume [indefinitely]
                  End Loop

                  This must be used with caution. You have to place a button or a triggered script on the pop up that uses Halt Script to terminate this script after closing the pop up window, or you can be trapped in a situation where (unless you use FileMaker Advanced's Script Debugger), you may have to force quit FileMaker.

                  You can find examples of this trick in the Known Bugs Database.

                  • 6. Re: Portal Row pop-up
                    DomMolloy_1
                    Got modal working great, saw one of your earlier posts on that.  However, not getting a new window to pop open once published to web. This had been working so I'm going to have to tinker with that next.
                    • 7. Re: Portal Row pop-up
                      philmodjunk

                      This isn't a technique you can use with Instant web publishing. As far as I know, there is no way to pop up any kind of additional window or custom dialog from inside the web browser. You'll need to use a different method here for that.