Subscribe Bookmark RSS Feed

JSL: how to create a reference to a table variable inside a column formula

Brown

New Contributor

Joined:

Jun 21, 2017

Hi all,

 

In JSL, I scripted a query that creates a table with two columns. Something like this:

Query( 

Table( nameOfTable, "t1"),

"SELECT -- FROM -- GROUP BY -- ORDER BY --;"

);

 

This query works fine and does everything it needs to. After th ecode runs, it opens a talbe of exactly what I am looking for. My problem is storig that query in a variable so that I can reference it as I do further processing. I can't do:

variable = Query ( query stuff );


I have some FOR loops to parse through the cells of the table, but I cant get a reference to the table so that I can do the parsing. Is there a syntax issue I'm missing?

 

Please help. Thanks!

1 REPLY
M_Anderson

Staff

Joined:

Nov 21, 2014

Have you tried saving it as a table script? Table variables are for constants, strings, etc... The table scripts are for scripts. The instructions in the scripting guide (Help > Books > Scripting Guide) are pretty clear on how to do this. There is also a good example in the Scripting Index. Just look for table script.

M