JSL: how to create a reference to a table variable inside a column formula
Jun 21, 2017 5:06 AM(838 views)
In JSL, I scripted a query that creates a table with two columns. Something like this:
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?
Re: JSL: how to create a reference to a table variable inside a column formula
Jun 21, 2017 6:05 AM(833 views)
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.