Use the Event Handler column property to build hyperlinks based on one or more columns in your data table. This example shows how the hyperlinks in the SAS Offices.jmp sample data table were created.
1.
|
2.
|
‒
|
thisTable is the data table object.
|
‒
|
thisColumn is the column object.
|
‒
|
iRow is the index of the row in thisColumn.
|
‒
|
Web opens the URL in the default browser.
|
‒
|
The @ sign in "https://www.google.com/maps/@" is specific to the Google API for maps. Google expects coordinates to follow it.
|
‒
|
||Char(thisTable:latitude[irow]) concatenates the latitude defined in the Latitude column.
|
‒
|
||","||Char(thisTable:longitude[irow])|| concatenates the longitude defined in the Longitude column.
|
‒
|
The Google API uses ",12z" to specify a zoom factor.
|
See JMP Colors for a diagram of JMP colors.
New Table( "Wildlife",
Set Property( "Event Handler",
thisTable:thisColumn[ iRow ] ) || " in a media player."; );) ),
The SAS Country Office and Photo columns in SAS Offices.jmp also contain examples of Event Handler scripts.