table (PPTX)
A PowerPoint content command that iterates through all items of a Collection and produces a copy of all of a table's pre-existing non-header, non-total rows, contents included, for every item in the Collection. Any inline EL expressions within the rows are evaluated on each round of the iteration, with one of the items of the Collection as a variable in the context for these expressions to make use of. This command should only be placed onto a table shape.
If the table has a table style that defines specific styling for Header and/or Total row, the first and last row, respectively, are not multiplied during the iteration, but any inline EL expressions within these rows are evaluated before the iteration process occurs. With either or both of these styles enabled, the table needs to have at least one row that isn't a header or a total row - otherwise there's no row for the command to copy.
This command has a priority of 90.
Syntax:
table(value,var,varStatus,roundTest)
With required attributes only:
table(value,var)
Attributes
#1 - value | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | Collection, Map, Data Item | Yes |
This attribute defines the container whose contents the command will iterate through. While this container is primarily expected to be a Collection, two other types of values are also accepted. The three types are handled in the following ways:
If the value is either an empty Collection or an empty Map, the entire table will be removed. |
#2 - var | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | No |
The value of this attribute defines the name of the local context variable that holds the current item of the loop. |
#3 - varStatus | ||
---|---|---|
Required | Value type | EL-evaluated |
No | String | No |
Defines the name of the variable that holds a Loop Status value. Loop Status has the properties Property |
#4 - roundTest | ||
---|---|---|
Required | Value type | EL-evaluated |
No | Boolean | Yes |
This attribute can be used to define a condition for skipping certain iteration rounds. This attribute's expression is evaluated at the start of every round and if it doesn't resolve into If undefined, no iteration rounds are skipped. |
Examples
To use the table
command, give it a Collection of data, such as Salesforce query results, and place inline EL expressions within the table's cells. With a table
command like this...
table(products,product)
...Inline EL expressions like ${product.name}
and ${product.unitPrice}
referring to the product
variable value from the Collection can be used in the cells. But not in the cells of the Header or Total row - they are evaluated outside the iteration process and therefore cannot refer to the iterated item.
The third and fourth attributes varStatus
and roundTest
can be used together or individually. The condition in roundTest
may refer to the Loop status value created with varStatus
, so the following table would display only 10 products at maximum:
table(products,product,status,status.index < 10)
The Loop status value could also be used to produce numbering on the data rows, with an inline EL expression like ${status.count}
resolving into numbers starting from 1. The condition of roundTest can also refer to the current item of the loop, so the following table would only display products of the type "Triangular":
table(products,product,,product.type == 'Triangular')