Example 1
This example filters a table based on a comparison of values found in two cells of each row.
Rule
TableFilterByRowFunction(
DwLookupBeamSizesSy,
DWLambda(
dataRow,
TableGetValue(dataRow,3,1)*100<TableGetValue(dataRow,2,1)
)
,FALSE
)
Result
The result is a new array that only includes rows where the value in cell 3, multiplied by 100, is less than the value in cell 2.
Viewed as an array:
{"Size","Sy","WT","W";"W27 x 178","78.8","0.725","14.1";"W27 x 146","63.5","0.605","14";"W21 x 147","60.1","0.59","11";"W21 x 101","51.2","0.5","9.5"}
Viewed as a table:
Size | Sy | WT | W |
---|
W27 x 178 | 78.8 | 0.725 | 14.1 |
W27 x 146 | 63.5 | 0.605 | 14 |
W21 x 147 | 60.1 | 0.59 | 11 |
W21 x 101 | 51.2 | 0.5 | 9.5 |
Data (Table named BeamSizesSy)
The original table containing the array to be filtered.
Size | Sy | WT | W |
---|
W27 x 178 | 78.8 | 0.725 | 14.1 |
W27 x 161 | 65.9 | 0.66 | 14 |
W27 x 146 | 63.5 | 0.605 | 14 |
W27 x 114 | 31.5 | 0.57 | 10.1 |
W24 x 55 | 8.3 | 0.44 | 10 |
W21 x 147 | 60.1 | 0.59 | 11 |
W21 x 132 | 53.5 | 0.58 | 11 |
W21 x 101 | 51.2 | 0.5 | 9.5 |
W21 x 93 | 22.1 | 0.48 | 9.5 |
W21 x 83 | 19.5 | 0.47 | 9 |
W21 x 57 | 9.4 | 0.38 | 8 |
Example 2
This example filters a table based on a comparison of values found in two cells of each row, and conditionally include a given row.
Rule
TableFilterByRowFunction(
DwLookupBeamSizesSy,
DWLambda(
dataRow,
rowIndex,
If(
rowIndex=11,
TRUE,
TableGetValue(dataRow,3,1)*100<TableGetValue(dataRow,2,1)
)
),FALSE
)
Result
The result is a new array that only includes rows where the value in cell 3, multiplied by 100, is less than the value in cell 2. Row 11 is included regardless of this match.
Viewed as an array:
{"Size","Sy","WT","W";"W27 x 178","78.8","0.725","14.1";"W27 x 146","63.5","0.605","14";"W21 x 147","60.1","0.59","11";"W21 x 101","51.2","0.5","9.5";"W21 x 57","9.4","0.38","8"}
Viewed as a table:
Size | Sy | WT | W |
---|
W27 x 178 | 78.8 | 0.725 | 14.1 |
W27 x 146 | 63.5 | 0.605 | 14 |
W21 x 147 | 60.1 | 0.59 | 11 |
W21 x 101 | 51.2 | 0.5 | 9.5 |
W21 x 57 | 9.4 | 0.38 | 8 |
Data (Table named BeamSizesSy)
The original table containing the array to be filtered.
The row with index 11, included by the rule, has been highlighted.
Size | Sy | WT | W |
---|
W27 x 178 | 78.8 | 0.725 | 14.1 |
W27 x 161 | 65.9 | 0.66 | 14 |
W27 x 146 | 63.5 | 0.605 | 14 |
W27 x 114 | 31.5 | 0.57 | 10.1 |
W24 x 55 | 8.3 | 0.44 | 10 |
W21 x 147 | 60.1 | 0.59 | 11 |
W21 x 132 | 53.5 | 0.58 | 11 |
W21 x 101 | 51.2 | 0.5 | 9.5 |
W21 x 93 | 22.1 | 0.48 | 9.5 |
W21 x 83 | 19.5 | 0.47 | 9 |
W21 x 57 | 9.4 | 0.38 | 8 |