Subscribe Bookmark RSS Feed

How to get a table's all variables without knowing their names?

get table variable("name") has to have a quoted name;
6 REPLIES
mattf

Community Trekker

Joined:

Jun 23, 2011

Hi:

From this example from the help files, one can get the list of column names, or variables:

One can then iterate over the list and process each column in turn.

what I meant is for dt<
JSL users, anybody else can give some inputs? thanks.
wjlevin

Community Trekker

Joined:

Jun 23, 2011

I'd do a dt << get script () and then walk through the resulting string to identify the area of the message that involves variables. You'll need to use N Arg () and Arg () to do the walking.

Good luck!

Wayne
thanks. I just made it with the following lines.
<----
dt=Current Data Table();
dt<allscripts=dt<vnamelist={};
for(i=1,i<=narg(allscripts),i++,
if(
left(char(arg(allscripts,i)),18," ")=="New Table Variable",
vname=item(2,char(arg(allscripts,i)),"\!"");
insertinto(vnamelist,vname);
);
);

---->
mattf

Community Trekker

Joined:

Jun 23, 2011

--- Nice