Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I currently have an Access database with staff names and addresses and have set up a function whereby clicking on a map icon next to the staff member's name gives me a Google map showing the route from their house to the office (this is for disaster team call outs so that I can see if they are going to be affected by flooding, tornadoes etc.)

I am transferring all this data over to a SharePoint site so that more people can see the data and each individual is responsible for keeping their own records up to date.

Is there a way to create a new column in my contacts list to have the same functionality?

For reference, here is the code that is executed when the icon is clicked:

Function OpenMap(Address, City, State, Zip, Country)

    Dim strAddress As String
    strAddress = Nz(Address)
    strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(City)
    strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(State)
    strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(Zip)
    strAddress = strAddress & IIf(strAddress = "", "", ", ") & Nz(Country)

    If strAddress = "" Then
        MsgBox "There is no address to map."
    Else
        ' Application.FollowHyperlink "http://maps.live.com/default.aspx?where1=" & strAddress
        Application.FollowHyperlink "http://maps.google.com/maps?f=d&source=s_d&saddr=" & strAddress & "&daddr= ***My office address goes here ***"

    End If
End Function
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

There really are a lot of different options for this, but in my opinion your best options aren't to add it directly into the list but rather customize the way it is presented.

One way to do it would be to create a simple DataView and render it out in the XSL. I have added buttons and click events to some of mine, in some cases they even call web services and do further updates via jQuery.

A second, more robust way to handle this is to write a web part. This is the way I would go unless deploying solutions to your environment is a real pain.

share|improve this answer
    
Deploying solutions is a real pain as I am using a Network Solutions hosted WSS3.0. I did find one article which may have helped but it involved getting an API from Google and as it is for an Intranet we can't use this free option. I'm very new to all this so when you say "One way to do it would be to create a simple DataView and render it out in the XSL" I have no idea what that means! Can you give me some hints, or links to dummies guides to get me started? Much appreciated, thank you. –  Anonymous Mar 2 '10 at 16:55
1  
If you do a search on "How to create a DataView" you can get some nice tutorials. This is done with SharePoint Designer and is pretty easy point and click stuff to get started. You will need to be able to work with XSL, html, and javascript in order to be able to add in a column with the button and a click event. –  Mike Oryszak Mar 2 '10 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.