BookmarkSubscribeRSS Feed

Re: Does jmp allow the contents of a cell to be a hyperlink

jrphage

New Contributor

Joined:

May 10, 2018

Is it possible in jmp to make the contents of a cell a hyperlink such that when a user clicks on a cell it can open the hyperlink?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

Sure. JMP 14 added the Event Handler Column Property.

 

If your column is the URL you want to open on a Click then just add the Event Handler property and the default Click script will open that URL in your web browser.

JMPScreenSnapz201-4.png

Alternatively, if you want to make something else clickable, you can build the URL out of information in your table and use that as the argument to the Web() function in the Click script.

JMPScreenSnapz202-3.png

Event handlers can do a lot more than just hyperlinks. I'll try to expand on them in a blog post soon.

-Jeff
stan_koprowski

Community Manager

Joined:

Aug 8, 2012

Solution

Hi @jrphage,

If you are using JMP 14 you can set it with a column property entitled event handler.

Books-->Scripting Guide and search for event handler.

"...You can define a text column as a column of hyperlinks using the Event Handler column property. For example, you can create a column of geographical data as links to a Google map, or you might want to include links to a Wikipedia web pages..."

 

 

 

 

8 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

Select the data column. Select Cols menu > Column Info. Change the Data Type attribute to Expression.

Learn it once, use it forever!
jrphage

New Contributor

Joined:

May 10, 2018

Thanks so much!  So if I change the column info as you suggested and then add something like "http://www.jmp.com" to the contents of the cell, it should then treat that cell as a hyperlink?  I have tried that and it doesn't seem to be working.

markbailey

Staff

Joined:

Jun 23, 2011

I am sorry. That change is necessary but not sufficient. With the new Expression data type, you also have to add associated Expression Role column property to indicate how the data in this column is to be used. The four roles that are available are Picture, Matrix, Expression, and Picture Expression. There is also the Event Handler column property, which is what I think you need to specify the action associated with a hyperlink. This is what the Using JMP guide has to say about the Event Handler property:

Use the Event Handler column property to define hyperlinks in a text column. The hyperlinks can be used to open web pages and other documents. Add the Event Handler to a column of URLs to open the URLs in a browser. (Hyperlinks to web pages in the text column must include “www”.) You can also modify the placeholder scripts on the column property to open different kinds of resources. For example, in a data table of geographical data, you might edit the Click script to display a Google map when the user clicks the hyperlink in the data table. The SAS Offices.jmp sample data table provides examples.

 

 

Learn it once, use it forever!
markbailey

Staff

Joined:

Jun 23, 2011

I admit that I saw this feature introduced a long time ago but I have not used it myself since that time. Perhaps another user will help at this point with an example or further explanation.

Learn it once, use it forever!
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

Sure. JMP 14 added the Event Handler Column Property.

 

If your column is the URL you want to open on a Click then just add the Event Handler property and the default Click script will open that URL in your web browser.

JMPScreenSnapz201-4.png

Alternatively, if you want to make something else clickable, you can build the URL out of information in your table and use that as the argument to the Web() function in the Click script.

JMPScreenSnapz202-3.png

Event handlers can do a lot more than just hyperlinks. I'll try to expand on them in a blog post soon.

-Jeff
jrphage

New Contributor

Joined:

May 10, 2018

Thanks so much everybody.  Is this a feature only in JMP 14, or can I do it in JMP 13?  I am currently using JMP 13.

Highlighted
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

It is new in JMP 14. As @markbailey alludes, it can be done with Expression columns but it's quite a hack and not as useful as what's in JMP 14.

 

-Jeff
stan_koprowski

Community Manager

Joined:

Aug 8, 2012

Solution

Hi @jrphage,

If you are using JMP 14 you can set it with a column property entitled event handler.

Books-->Scripting Guide and search for event handler.

"...You can define a text column as a column of hyperlinks using the Event Handler column property. For example, you can create a column of geographical data as links to a Google map, or you might want to include links to a Wikipedia web pages..."