7 Replies Latest reply on Jan 6, 2016 3:00 PM by davidhead

    Problem with portals

    dgp_express

      I have a contact table linked to an additional addresses table in a 1 to many relationship.

      I have a portal set up to show address for a contact and a popover button that opens a popover to show a google map.

      The problem is that it only shows the 1st or primary address in the popover irregardless of which portal row I am on.

      How can I get the popover to recognize the proper data and show an accurate map of that address?

        • 1. Re: Problem with portals
          DanielShanahan

          When you open the popover you need to pass it the address info from the portal record you clicked.

           

          How are you accessing Google Maps?  Are you using a custom function or are you using the default from the web viewer object for Google Maps:

           

          "http://local.google.com/maps?" & "q=" & /*Address=*/ "" & "," & /*City=*/ "" & "," & /*State=*/ "" & "," & /*Zip Code=*/ "" & "," & /*Country=*/ ""

          • 2. Re: Problem with portals
            dgp_express

            I am using the default web viewer - I have been trying to script this to send the correct data to the popover but have not bee very successful.

            • 3. Re: Problem with portals
              keywords

              Are you sure the data sent to the WV is from the selected portal row? It sounds like the relationship may not being addressed properly, hence you get the default first matching record all the time.

              • 4. Re: Problem with portals
                BruceRobertson
                I am using the default web viewer - I have been trying to script this to send the correct data to the popover but have not been very successful.

                OK. But that doesn't provide any meaningful detail about exactly what you did. Recognize that an answer, exactly parallel in level of detail, would be "When I wrote a script it was successful."

                What does your script look like? Can you attach a copy of the script or a clone of your file or can you make an example file that demonstrates what you are trying to do?

                • 5. Re: Problem with portals
                  davidhead

                  Web Viewer behavior in Layout Mode | FileMaker

                  Web Viewers in Portals

                  You can’t place a web viewer in a portal. If you place a web viewer on a portal, the web viewer appears as an object on the layout that overlaps the portal.

                   

                  This means that you also cannot place a web viewer in a popover in a portal – that is just like putting it directly in the portal.

                   

                  Since the web viewer is not IN the portal, it will only have access to the first related record. This is the behaviour you are seeing.

                  • 6. Re: Problem with portals
                    keywords

                    Ahh yes! That makes sense. So what you need to do is capture the relevant portal row data in a script (use set variable) and post it to a WV elsewhere on your layout. done properly you would get the same effect you are seeking.

                    • 7. Re: Problem with portals
                      davidhead

                      The way around it would be to load a global field with the URL required when you open the popover (OnObjectEnter script trigger for the popover). And use this global as the web viewer URL.