SECTION# returns a string containing the section with corresponding parameter values (and names) of two Telitab sets
Arguments
SECTION#(Telitab_1$, UnfoldPar_1$, Telitab_2$, UnfoldPar_2$, Mode%)
Arguments
Telitab_1$ is is a string expression containing/returning the first Telitab set.
is UnfoldPar_1$ is a name of parameter for which to unfold the first Telitab set, see also the UNFOLD#() function.
is Telitab_2$ is a string expression containing/returning the second Telitab set.
is UnfoldPar_2$ is a name of parameter for which to unfold the second Telitab set.
provides Mode% provides options how to return the result returns
...
So if Telitab_1$ contains the dataset:
2
"MODELS"
{
0
-4 "1" "2" "3" "4"
"MODMAT$" "wood" "foam" "wood" "plywood"
"LPP" 112.30 133.80 98.60 145.00
"B" 17.80 21.50 16.42 22.40
"T" 7.65 9.20 6.70 9.40
}
"PROJECTS"
{
1
"CLIENT$" "YardX"
}
To explain the data:
you have two objects, MODELS and PROJECTS presented as list values in Telitab_1$ containing TeLiTabs themselfs (with several parameters).
LPP is part of the MODELS object (TeLiTab).
When you unfold Telitab_1$ dataset on parameter "LPP", you get:
1
"PROJECTS"
{
1
"CLIENT$" "YardX"
}
0
-4 "1" "2" "3" "4"
"MODMAT$" "wood" "foam" "wood" "plywood"
"LPP" 112.30 133.80 98.60 145.00
"B" 17.80 21.50 16.42 22.40
"T" 7.65 9.20 6.70 9.40
You see that PROJECT still is a separate object (and presented as a list value in Telitab_1$). All other data (which was part of the MODELS object) now is part of Telitab_1$ and thus a table in the TeLiTab.
...
Telitab_2$ contains the dataset:
0
-4 "1" "2" "3" "4"
"MODNO$" 5684 6231 6301 6537
"LPP" 112.30 162.70 133.80 118.50
"B" 17.80 27.80 21.50 16.70
"T" 7.65 11.20 9.20 6.80
and UnfolPar_2$ contains "NullString", so no unfolding is performed
Now the actual section is created using the following syntax:
SECTION#(Telitab_1$, "LPP", Telitab_2$, "NullString", 0)
and it returns:
0
-3 "1" "2"
"LPP" 112.30 133.80
"B" 17.80 21.50
"T" 7.65 9.20
Please note that using Mode%=0 means that the section is returned casewise (per row) and case parameters not present in both sets like "MODNO$", "MODMAT$" and the object "PROJECT" are not in the returned result.
...
If these parameters should be also in the result, use Mode%=1, so for the above argument values,
SECTION#(Telitab_1$, "LPP", Telitab_2$, "NullString", 1)
returns:
1
"PROJECTS"
{
1
"CLIENT$" "YardX"
}
-5 "1" "2"
"MODMAT$" "wood" "foam"
"LPP" 112.30 133.80
"B" 17.80 21.50
"T" 7.65 9.20
"MODNO$" 5684 6301
The SECTION#() function with Mode%=1 can be used as a special query function. The section of two Telitab sets produced by this functiun completes a set of data by combining data from two source sets in a single table (see also UNION#()).
Quick links: replacementstringdezemoetuniekzijnbladiblaFunctions overview | Attribute overview | Constants overview | Dimensions overview