cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

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