table fill vertically, table fill vertically selected rows
In various tables, contents are mentioned in only one row and the rows below are kept blank even though the same contents are assumed. This function will repeat the contents in accordingly.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name and row number for selected function parameters
2-5
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
Opt. 2. code |
expression :string |
Expression to select rows Applicable to table fill vertically selected rows only: |
2. / 3. input |
table columns | Columns to repeat In these columns, blank rows will be overwritten by the exsiting contents above (or below if specified in the last function parameter.
|
Opt. 3. / 4. input |
set or string | Strings representing repetition If one string is provided, then it will be used to compare with all columns. If more strings are provided in a set, then they will
correspond with the columns specified. If the set contains fewer elements than the number of columns provided, then the last element
will apply for the remaining columns. Otherwise, if this set is longer, then the excess values will be ignored.
Soft quoted strings allow use of wildcard symbols in order to compare for different strings, e.g. 'see above*,' covers begins with 'see above'
and equals to blanks (note the comma at the end).
|
Opt. 4. / 5. input |
string | Direction Following values are supported: up and down for repeating contents in upward resp. downward direction. Default value: down |
table initialize ( t, { {Name, Date, Tennis Scores},
{ Jim, "2020-06-20", "6:5 6:2 6:3" },
{ "", "same day" , "7:6 6:4 5:6" },
{ "", "2020-06-21", "6:2 5:6 4:6" },
{ Jane, "same day", "5:4 6:5 7:6" },
{ "", "", "3:6 7:6 6:5" } } );
table copy table ( t, u );
echo("Repeat blank entries");
table fill vertically( t, { Name, Date }, { "", 'same day,' } );
table list ( t );
echo("Here: Ignore entries with blankn names. Jane played at the same date as Jim did.");
table fill vertically selected rows ( u, [Name]!="", { Name, Date }, { "", 'same day,' } );
table list ( u );
Repeat blank entries
0 : Name | Date | Tennis Scores
1 : Jim | 2020-06-20 | 6:5 6:2 6:3
2 : Jim | 2020-06-20 | 7:6 6:4 5:6
3 : Jim | 2020-06-21 | 6:2 5:6 4:6
4 : Jane | 2020-06-21 | 5:4 6:5 7:6
5 : Jane | 2020-06-21 | 3:6 7:6 6:5
Here: Ignore entries with blankn names. Jane played at the same date as Jim did.
0 : Name | Date | Tennis Scores
1 : Jim | 2020-06-20 | 6:5 6:2 6:3
2 : | same day | 7:6 6:4 5:6
3 : | 2020-06-21 | 6:2 5:6 4:6
4 : Jane | 2020-06-20 | 5:4 6:5 7:6
5 : | | 3:6 7:6 6:5