Subscribe Bookmark RSS Feed

Help getting a Tabulated Data Table as the Current Data Table.

jjstapleton

Community Trekker

Joined:

Jun 23, 2011

Hello.

OK, here is my problem is.

I have written a script that pulls process data (from a MS Access Database), and then tabulates it into a 3 column data table (Equipment#, Date, and Process Variable). My problem is that I need to rename the tabulated table so I am able to further modify it (by adding Control limits and performing calculations...etc).

However, whenever I type "Current Data Table();" the log shows me that the raw data table (process data), not the tabulated table, is the current data table. There is something going on that will not allow me to set the tabulated table as the current data table.

I can post some of the script if that will help.

Thank You in advance for your help.
3 REPLIES
mpb

Super User

Joined:

Jun 23, 2011

The most recently created table can be referenced as Data Table(1). Send it a message to rename itself and use that name:

data table(1) << set name("My Tab");
mpb

Super User

Joined:

Jun 23, 2011

Or you could try something like this example (assuming Fitness data is open).


style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">dt

style="font-size: 10pt; font-family: "Courier New"; color: navy;">=

style="font-size: 10pt; font-family: "Courier New"; color: black;">
(tab

style="font-size: 10pt; font-family: "Courier New"; color: navy;">=

style="font-size: 10pt; font-family: "Courier New"; color: black;">

style="font-size: 10pt; font-family: "Courier New"; color: rgb(0, 0, 221);">Data
Table

style="font-size: 10pt; font-family: "Courier New"; color: black;">(

style="font-size: 10pt; font-family: "Courier New"; color: black;">

style="font-size: 10pt; font-family: "Courier New"; color: purple;">"Fitness"

style="font-size: 10pt; font-family: "Courier New"; color: black;">
)

style="font-size: 10pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 10pt; font-family: "Courier New"; color: black;">
Tabulate(



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">
style="">     
Show
Control Panel(

style="font-size: 10pt; font-family: "Courier New"; color: teal;">0

style="font-size: 10pt; font-family: "Courier New"; color: black;">
)

style="font-size: 10pt; font-family: "Courier New"; color: navy;">,

style="font-size: 10pt; font-family: "Courier New"; color: black;">



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">
style="">     
Add
Table(



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">
style="">           
Column
Table(
Analysis Columns(

style="font-size: 10pt; font-family: "Courier New"; color: navy;">:

style="font-size: 10pt; font-family: "Courier New"; color: black;">Oxy

style="font-size: 10pt; font-family: "Courier New"; color: navy;">,

style="font-size: 10pt; font-family: "Courier New"; color: black;">

style="font-size: 10pt; font-family: "Courier New"; color: navy;">:

style="font-size: 10pt; font-family: "Courier New"; color: black;">Runtime

style="font-size: 10pt; font-family: "Courier New"; color: navy;">,

style="font-size: 10pt; font-family: "Courier New"; color: black;">

style="font-size: 10pt; font-family: "Courier New"; color: navy;">:

style="font-size: 10pt; font-family: "Courier New"; color: black;">RunPulse
)
)

style="font-size: 10pt; font-family: "Courier New"; color: navy;">,

style="font-size: 10pt; font-family: "Courier New"; color: black;">



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">
style="">           
Row
Table(
Grouping Columns(

style="font-size: 10pt; font-family: "Courier New"; color: navy;">:

style="font-size: 10pt; font-family: "Courier New"; color: black;">Sex
)
)



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">
style="">     
)



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">))

style="font-size: 10pt; font-family: "Courier New"; color: black;">

style="font-size: 10pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 10pt; font-family: "Courier New"; color: black;">
Make Into Data
Table

style="font-size: 10pt; font-family: "Courier New"; color: navy;">;

style="font-size: 10pt; font-family: "Courier New"; color: black;">



style="margin-bottom: 0.0001pt; line-height: normal;">
style="font-size: 10pt; font-family: "Courier New"; color: black;">dt

style="font-size: 10pt; font-family: "Courier New"; color: navy;"><<

style="font-size: 10pt; font-family: "Courier New"; color: black;">
set name(

style="font-size: 10pt; font-family: "Courier New"; color: purple;">"New
Tab"

style="font-size: 10pt; font-family: "Courier New"; color: black;">
)

style="font-size: 10pt; font-family: "Courier New"; color: navy;">;

style="font-size: 10pt; font-family: "Courier New"; color: black;">



style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: black;">tab

style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: navy;"><<

style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: black;">
close window

style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: navy;">;

jjstapleton

Community Trekker

Joined:

Jun 23, 2011

MPB,

Thank you very much. I did not know that you could just do a numerical table reference. The first solution worked perfectly for me.

Thank you!!