cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

How to look up a value in a cell.

Can I assign a value to a variable using a database, a column, and a row?

My script, at present, opens a timestamped database of information for my system.  I add a column that declares the last row when a certain valve was open.  I can use Col Max to find the latest overall point when that occurs. I'd like to assign a variable for the Timestamp when that occurs.  Of course I could just make a new column that specifies the timestamp at each valve opening.

I just wondered if there was a way to look up a cell using row, column, and database.

1 REPLY 1
pmroz
Super User

Re: How to look up a value in a cell.

JMP table cell references are pretty easy.  If you have read in a table with this command:

dt = open database(dsn_string, "select * from mytable");

Suppose you want the value of the last row for the column called Timestamp.  You can reference that cell with syntax like this:

lr = nrows(dt);

one_cell = dt:timestamp[lr];

one_cell = column(dt, "Timestamp")[lr];

current data table(dt);     // need this to insure we're looking at the right table

one_cell = :Timestamp[lr];

one_cell = :name("Timestamp")[lr];

Recommended Articles