cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use JMP Live to centralize and share reports within groups. Webinar with Q&A April 4, 2pm ET.
Choose Language Hide Translation Bar
View Original Published Thread

Using variables in path name

Polyabc
Level II

Hello,

Please forgive me if this is a trivial question, I do not have much experience working with JSL. 

 

I am trying to add a picture to the hover label using JSL code, and want to define the picture path using a variable. I have a folder of pictures, and want them to be called using a variable in my table.

 

For example, my pictures are labeled 1 to 100, and I have a column in my table called "picture number". I want to be able to call them, like this:

 

PictureBox(Open("c:/iris/"picture number" .jpg", jpg));

 

is this possible?

 

Many thanks!

 

10 REPLIES 10
nascif_jmp
Level VI


Re: Using variables in path name

Wow, excellent example, @jthi ! Thank you for sharing it!

The trick here is that when you are building the image fine name from a table column, you have to indicate the column name AND the row. Inside the Local namespace populated by the graphlet execution context, the current row is available in the variable local:_firstRow. Thus the construct:

Picture Box(Open(Column("PicAdress")[local:_firstRow],jpg))

 For more information on this and other variables, see Hover Label Execution Context.