cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Polyabc
Level II

Using variables in path name

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.

Recommended Articles