1 Reply Latest reply on Jun 2, 2014 3:36 PM by philmodjunk

    Portal Row Button for Web Viewer

    bdexter75

      Title

      Portal Row Button for Web Viewer

      Post

           Hello All,

           I’m trying to replicate a feature I saw (but can’t seem to find) in another FM database example. 

           I have an address portal on one of my layouts with a container field, with an icon (button) inside it.  When the button is press I want it to pass the address information from the three adjacent fields in that row and open a web viewer to display the Google map.  As it stands, it opens the web viewer alright, but it passes the data for the related record I’m on and not the portal row, so it displays an address in the portal other than the one I want.  Is there a specific script step command to accomplish this?

           Any ideas/help would be appreciated.

        • 1. Re: Portal Row Button for Web Viewer
          philmodjunk

               The typical URL expression for Google maps includes references to fields in one of your database fields for the state, city, street. If you replace those references with references to global variables such as $$City, $$Street and $$State, the button in your portal row can be:

               Set variable [$$State ; value: PortalTable::State ]
               Set variable [$$City ; value: PortalTable::City ]
               Set variable [$$Street ; value: PortalTable::Street ]

               Or you can use

               Set Web Viewer [Object Name: "Web Viewer Object Name Here"; URL: //Google Maps with embedded address field references goes here]

               And you'd put your map URL with references to field names in your portal table in place of the text starting with // above.