Dynamic Features

Without doubt one of the most useful aspects of Perfion Tables is it Dynamic Features capability.

Normally cells in the table can be setup to project fixed feature values into the output results. A dynamic cell can be configured to expand into many features, and then each of the features will project their values into the output results. Further, only features that actually contain values will be included.

Here is a table setup with fixed values:

 

Here is a table that uses a dynamic cell to acquire the No. of cups, Material, Dishwasher Safe, Diameter and Volume features:

There are several ways to acquire features for expanding in dynamic cells.

  1. Query the Feature names from a value.

  2. Query the feature names from an Information Group.

  3. Explicit list of feature IDs.

  4. Query all the Feature names available,

  5. Query the Feature names that contain common values across the data source.

Query the Feature names from a value

This approach requires a Feature be setup in Perfion as a multi-value selectable string.

Below is an example of how to setup and use a feature that can supply feature names to a dynamic cell using the demo data.

  1. Create a new feature as a multi-value, sortable string and name it FeatureSelection.

  2. By making the feature sortable, you can control the order of the features in the final output.

  3. Add the feature names that you would like as choices to the new feature.

  4. Add the new feature to the configuration of Product.

  5. Assign feature selection choices to specific products. For example in the demo database I chose:

    1. VolumeL for CHAMBORD

    2. Material and DiameterCM for PEBO

    3. DishwasherSafe and VolumeL for THEO SLOW BREW

  6. Note down the ID of the FeatureSelection feature. This can be found be editing the feature and looking at the top right part of the screen.

  7. Create a new table entry and name it DynamicExample

  8. Ensure that the table feature has been added to the configuration of Product.

  9. Add the table entry against CHAMBORD, PEBO and THEO SLOW BREW:

  10. Edit the table entry in the Table Designer, below is the design we are aiming for:

11. Start by setting up the data source. Edit the primary data source, and change the query such that it lists just Normal items under the Coffee Makers Category. The query should look like the following:

12.   Check the data source by pressing F5 after the query has been saved. You should see a list of the products shown in the Data source panel.

13.   From the Feature list panel, drag the Product feature into the first cell.

14.   Change its property to a caption.

15.   Create a row below and change its type to Value.

16.   Drag Product into the Cell.

17.   Next, insert a column to the right of the Product column.

18.   Set the first cell to type Dynamic.

19.   Right click on the Dynamic cell and add a new Dynamic Value.

20.   Change the Dynamic Values property to Caption.

21.   In the Cell properties, add @FEATURES(nn) to the FeatureList. Note: you must replace nn with the ID of FeatureSelection feature.

22.   Change the Cell below to a Value type.

23.   Right click on the Dynamic cell and add a new Dynamic Value.

24.   This completes the setup of this approach. Preview the table on each of the Coffee Maker types and you should get the following results:

CHAMBORD

PEBO

THEO SLOW BREW

 

 

 

 

 

Query the Feature names from an Information Group

Querying the features from an information group is straight forward.

Example of setting up a table with a dynamic cell which acquires its features from an Information Group:

  1. Go to Administration>Information Groups.

  2. Select the information group which has the features you wish to use.

  3. Copy the ID from the bottom left part of the screen into the clipboard

  4. Edit the table ( If you need details of how to setup a table with a dynamic cell, see the Query the Feature names from a value)

  5. Select the dynamic cell ( The one with a green background )

  6. In the properties for the Cell, Enter the following into the FeatureList property: @GROUP(nn) where nn is replaced with the ID you have in the clipboard.

Explicit list of feature IDs

It is possible to setup a dynamic cell with hardcoded IDs. This might seem like a pointless exercise as you could just setup columns normally with the features you require.

The advantage to using a dynamic column is that, because of the way the dynamics works, only features that contain values are used. So by using the dynamic approach empty columns will not appear. If all the features you entered are empty it will result in one empty column. This empty column can be removed by using the Collapse If Empty feature on the column.

To use the explicit feature list you just need to enter the feature IDs into the FeatureList property for a dynamic cell. For example 121,177

(If you need details of how to setup a table with a dynamic cell, see Query the Feature names from a value)

Query all the Feature names available

Querying all the features that have values on the data source is achieved by entering @LIST into the FeatureList property for a dynamic cell. (If you need details of how to setup a table with a dynamic cell, see the Query the Feature names from a value)

Query the Feature names that contain common values across the data source

Querying all the features that have the same values across all the rows of the data source can be achieved by entering @SHARED into the FeatureList property for a dynamic cell. (If you need details of how to setup a table with a dynamic cell, see the Query the Feature names from a value)

Points about using the FeatureList property

As described above, the FeatureList property on a dynamic cell can accept a number of different commands. For instance @GROUP(…), @FEATURES(…), @SHARED, etc

It is also possible to use the commands in combination. For example it is possible to use @LIST-@SHARED. This would result in all the non-shared features(Features that have non common values across the data source) to be used.

Another common usage would be @GROUP(nn)-123,126. Where nn is an information group ID and 123,126 are Feature IDs that you don’t want.