I am trying to save a script to my data table that will recreate a table I made previously. This is an add-in that is pretty extensive and involves opening/closing several different tables, creating summary tables, joining, updating and in the end the only data I will need for the reports is a simple 2 column table. I would like the users to be able to run this add-in one time, and if they accidentally close the resulting table, they will not have to run the add in again because there will be a script saved onto the original table that can recreate the final table and analysis window.
Hopefully that makes sense!
The problem I am running into is that the final table is a summary of one of the many tables created during the add-in script. So if I use the <<Get Table Script function, the result is "Data Table that no longer exists"<<Summary......etc. I want to use the <<Copy table script function, because it actually saves the column names and the values in each cell, which is exactly what I want! However, I can't figure out how to do this within my add-in script. Copy Table Script does not return anything that can be saved as a variable or expression, only copies the information to the clipboard so that it can be pasted later.
sum<<Delete scripts("Source");
script=sum<<copy table script;
dt<<New Script("Positions Table", script);This is an example of one thing I have tried that didn't work. dt is the original table that I would like to save this script to. sum is the table I want to recreate within the script.
Is this even possible???