cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Choose Language Hide Translation Bar
MarkDayton
Level IV

Table Scripts and the Parent Data Table

I have a set of scripts that I copy to new data tables. To make sure that when I run the table script it acts on the data table it belongs to I have to edit all of the scripts to point to the right data table (dt = Data Table("this one")). Is there a generic way to reference the parent data table, similar to dt = Current Data Table(), but more like dt = Parent Data Table()?

table script.jpg

13 REPLIES 13
MarkDayton
Level IV

Re: Table Scripts and the Parent Data Table

I thought about that, and I may give it a try, but I've decided to just go with David's suggestion and run the scripts from the data table so the Current Table will be the one I want. If I run the script from the editor, I'll just have to be more careful. Question, when writing a script to create table scripts, can comments be included in the table scripts?
MarkDayton
Level IV

Re: Table Scripts and the Parent Data Table

In answer to my own question no, comments are not included when using a script to add a script to a data table, the comments are stripped out just like they are when you copy scripts from one table to another (why anyone would think this was a desirable default behavior is beyond me, if I take the time to add comments to a script why would I want to throw them away anytime I go to use that script somewhere else).
David_Burnham
Super User (Alumni)

Re: Table Scripts and the Parent Data Table

OK I asumed you were just running it as a table script using the green triangle.

-Dave
MarkDayton
Level IV

Re: Table Scripts and the Parent Data Table

Thanks David, appreciate the help.