Add Table(s) in Setup|Tables has a USE Rows option that lets you use already-created rows in a new table; you can ‘borrow’ text, logic and the Table title from existing tables.
For example, say you're creating 20 tables based on the same satisfaction rating scales for 20 different brands; the rows for all 20 tables will be ‘Use Every Day,’ ‘Use Sometimes’ and ‘Never Use’. Rather than having to enter the text and logic for each row, you can create the first table, then use USE Rows to quickly specify the rows for all 19 of the other tables.
To use this option:
Express Table Editor also has USE Rows options.
USE Rows
The USE Rows dialog box displays information for existing tables. It shows information for the table you highlighted in the Tables list box and for all tables before that table.
Tables
The Tables list box displays the tables from which you can choose rows. Choose the desired table. If the table you want is not included, exit USE Rows and highlight that table in the Tables list box of Setup|Tables.
Rows
Rows lists the rows available for the currently selected table. Select another table in the Tables list box to view rows for that table.
For Variable files:
Variables (rather than Logic positions)
The Variables list box displays all the variables for the selected table. Many tables are based on just one variable, but if there are multiple variables they are all displayed.
Variable increment (rather than Position increment)
USE statement:
You can modify the USE statement logic here.
Generate USE statement from:
Allows you to create USE tables that use the Table name, when possible or the Table index of the selected tabled in the USE statement generated by WinCross.
For ASCII files:
Logic positions
The Logic positions list box displays all the logic positions (record/column) for the selected table. Many tables are based on just one record/column position, but if there are multiple positions, they are all displayed.
Position increment
USE statement:
You can modify the USE statement logic here.
Generate USE statement from:
Allows you to create USE tables that use the Table name, when possible or the Table index of the selected tabled in the USE statement generated by WinCross.
More about USE Rows:
Advanced Features for USE Rows:
The basic USE Rows procedure substitutes variables (or record/columns) from the used table each time the variable (or record/column location) changes.
You can use an advanced method, substituting variable names or record/column values. However, one statement cannot use both methods. The advanced method lets you specify the variable name or record/column from the used table, an equal sign (=) and then the variable name or record/column you want substituted for it in the new table:
USE = table name, used variable=new variable, used variable=new variable...
or
USE = table name, used record/col=new record/col, used record/col=new record/col...
USE = table index, used variable=new variable, used variable=new variable...
or
USE = table index, used record/col=new record/col, used record/col=new record/col...
The order of the variable or record/columns in the table being used is not important. The variable or record/column specified on the right of an equal sign is substituted for the variable or record/column from the table being used on the left side of the equal sign, even when complex logic statements are included. Variables or record/columns in the table being used that do not have a match in the USE statement are used ‘as is’ in the new table.
Example 1 (variable data):
If the logic in the table being used is:
{Q3_1 (6) AND Q5_1 (3,4)} AND NOT Q4_1 (2)
And the USE Rows statement is:
USE=Q3A,Q3_1=Q3_2,Q4_1=Q4_2,Q5_1=Q5_2
The result would be:
{Q3_2 (6) AND Q5_2 (3,4)} AND NOT Q4_2 (2)
Example 2 (ASCII data):
If the logic in the table being used is:
{1/25 (6) AND 1/29 (3,4)} AND NOT 1/27 (2)
And the USE Rows statement is:
USE=1,1/25=1/40,1/27=1/42,1/29=1/44
The result would be:
{1/40 (6) AND 1/44 (3,4)} AND NOT 1/42 (2)
USE Rows functions as a basic search and replace using the string on the right side of the equal sign (=) to replace the string on the left side of the equal sign (=).
Example 3 (variable data):
If the logic in the table being used is:
Q7 (99)
And the USE Rows statement is:
USE=Q7,Q7 (99)={Q5A (28) OR Q5B (30)} AND Q7 (99)}
The result would be:
{ {Q5A (28) OR Q5B (30)} AND Q7 (99)}
As with the basic USE Rows feature, you do not specify width (:), the Scan (S) feature or the Everywhere (E) feature, since these are specified in the table being used and are automatically included when the USE Rows statement is interpreted.
Writing the Advanced Statement:
Write the advanced statement similar to the way you use the basic feature. From Setup|Tables, select Add Table and select USE Rows. Select a table to use. Do not increment the variable or record/column position(s). Choose OK to go back to the Add Table dialog box, then choose OK again to return to the Setup|Tables dialog box.
The Row edit box displays the current logic, for example:
USE=10,Q1_1,Q2_1,Q3_1
or
USE=10,1/25,1/26,1/27
Enter the desired equivalencies in the Row logic field, for example:
USE=Q1,Q1_1=Q4_1,Q2_1=Q5_1,Q3_1=Q6_1
or
USE=Q1,1/25=2/30,1/26=2/31,1/27=2/32
Substituting code values:
You can also use equivalencies for substituting code values. Do this with caution: do not specify an equivalence that affects areas other than those you want to substitute.
For example, say you have a top-two box summary table with 50 attributes and three of those attributes are:
Variable Label |
Variable Logic |
Attribute 1 |
Q1 (4,5) |
Attribute 2 |
Q2 (4,5) |
Attribute 3 |
Q3 (4,5) |
Now you want to create a bottom-two box summary table of the same 50 attributes. You can use an equivalency statement to avoid retyping labels or logic. For example, you can simply enter:
USE=Q1,(4,5)=(1,2)
There are no variable or record/column specifications in the statement. You want to use the same variables or record/columns, so it is not necessary to reference them. The above statement means, ‘Substitute (1,2) for (4,5).’ If you were to write out these rows, the logic would be:
Variable Label |
Variable Logic |
Attribute 1 |
Q1 (1,2) |
Attribute 2 |
Q2 (1,2) |
Attribute 3 |
Q3 (1,2) |
Substituting characters in row logic:
You can also substitute all or part of row logic with the use of double quotation marks.
For example, you may have a table defined as:
Variable Label |
Variable Logic |
Attribute 1 |
Q1_SALES_SUPPORT (1) |
Attribute 2 |
Q2_SALES_SUPPORT (1) |
Attribute 3 |
Q3_SALES_SUPPORT (1) |
You want to use the same Attribute descriptions (row text). The only part of the logic that is different is a portion of the variable names for the USE table (Q1_TECHNICAL_SUPPORT, Q2_TECHNICAL_SUPPORT AND Q3_TECHNICAL_SUPPORT). You only need to substitute "SALES" with "TECHNICAL". Your USE statement would look like this:
USE=Q1,"SALES"="TECHNICAL" (where Q1 is a table name)
or
USE=10,"SALES"="TECHNICAL" (where 10 is the index number of the Q1 table)
For the USE table, the logic of Q1_SALES_SUPPORT (1) will become Q1_TECHNICAL_SUPPORT (1), Q2_SALES_SUPPORT (1) will become Q2_TECHNICAL_SUPPORT (1), etc.
You can use this substitution along with the other methods described above. For example:
USE=Q1,(4-5)=(1-2),"SALES"="TECHNICAL" (where Q1 is a table name)
or
USE=10,(4-5)=(1-2),"SALES"="TECHNICAL" (where 10 is the index number of the Q1 table)
Note: Keep in mind that using character substitution in the USE statement will replace those characters in the entire logic string. For Example, the following USE statement, USE=Q1SUM,"1"="2" for a table that has row logic of Q1_1 (1) would result in Q2_2 (2) which may not be the result you want. |
Related topics: