Google Maps Button

I have a form with with the Address, City, State, Zip showing. I want to add a button to take this info from the screen (Current Record) and build a link and open a web page (Google Maps) with it.

The link should open Google Maps as the link (Below)

www.google.com/maps/dir/18+L…aris,+IL+61944

The link should look like this when it opens the page with current record address info as the starting point.

I need to it do this way because the Google API does not give me the info I need, I then need to put in a destination address on the Google Maps page so I can get drive time and mileage.

I have added the button with the button section but I am unsure how to proceed from here.

Any Help would be appreciated.

Thanks Tim

There are different ways to do it.
You can create a virtual field on SC, and build a “link” to redirect to the URL you builded.

something like:

PSEUDO CODE
$direction = {direction};
$directionParsed = parseDirection($direction) //parse your direction to change spaces for + symbol
{myGoogleLink} = '<a href="www.google.com/maps/dir/' .$directionParsed. '">CLICK TO GO TO GOOGLE</a>';
1 Like

I am new to Scriptcase, I do not know how to get current record “Address” “City” “State” “Zip” to build the link, I then could concatenate the field to the Google maps address to get my desire result. Anybody that could help me with this?

Than You

Hello Giu,

Can you help me to add “virtual field” ?

There is my original question Link to Google maps?

Thanks