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. ET 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
Dorami
Level I

Column name with square brackets

I have seen some scripts adding  square brackets "[]" after the column name. What does that mean?

 

example : there column name is shopID

 

script : Loc = Num(Words(1, :shopid[]));

1 REPLY 1
jthi
Super User

Re: Column name with square brackets

That can be used to access value(s) of the column depending a bit where it is being used. Usually I use (or rather I don't as I prerfer using [Row()]) to access value of current row

 

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

/*
Show(row());
show(:name[]); // will fail as current row is 0 (non-valid)
*/

Row() = 1;
show(:name[]);
show(:name[Row()]);
show(:name[1]);

Row() = 28;
show(:name[]);
show(:name[Row()]);
show(:name[28]);

Scripting Guide > Data Tables > Access Data Values > Set or Get Values by Column Name 

Access Cell Values through Column References 

 

-Jarmo

Recommended Articles