Create Smart Folders from Datasets

As of Release 5.2.1, a Smart Folder can be created using a Dataset that contains data with such columns:  

  • Element ID and, optionally, 
  • Dimension Value(s)' ID

Such a Dataset is used to add content to the Smart Folder.  

PURPOSE

  1. Automatically populate Folders with a large number of Elements instead of adding each Element manually.
  2. Allow the Smart Folder's content to be controlled by the Dataset's values.
  3. Prevent Users with no access to the source Dataset from modifying the contents of the associated Folder.

If a Dimensioned element has [-1] in its row in the Dataset, all Dimension values are included in the Folder.  Undimensioned elements require no Dimension Value entry on its row.

A Configuration Variable ENABLE_SMART_FOLDERS controls whether or not a particular Instance allows to use this feature.  

Feature overview

To populate the list of elements for the Smart Folder you can use either an SQL command in the Dataset or upload the CSV/Excel file with the required fields. The query output or file contents should contain the Element ID and Dimension Value ID of the tiles to be included in the Folder.  

  • On the Homepage, elements from other Folders cannot be added to a Smart Folder or deleted from it except via changes to the Dataset's content.  
  • The Smart Folder's content is updated ONLY when there are changes in it's source Dataset's rows. It cannot be changed from the Folder Editor > Content tab.

The Viewer for Dimensioned elements displays the required IDs in the URL address:

  1. Element ID (number following element)
  2. Dimension Value ID (number following segment)

NOTE:  "Segment" is still used in the URL, being an older term for Dimension.

Create a Dataset from a CSV or Excel file

If a Dataset for a Smart Folder is to be populated using data uploaded from a CSV or Excel file, that file must meet the following criteria:

  1. Row 1 must contain unique column headers to identify the element ID (Col A) and the Dimension Value ID (Col B) values to be included.  
  2. Row 2 and all subsequent rows MUST have a value in Col A that is element ID.
  3. Col B is used to specify the Dimension Values for a Dimensioned element to those that are explicitly included in the Dataset.
    1. If the Element is undimensioned, no value is required in Col B.
    2. If only selected Dimensions from the Dimensioned Element are to be included, the appropriate Dimension Value IDs are entered in Col B.
    3. If all Dimension Values for a Dimensioned element are to be in the Smart Folder, the value [-1] must be entered in Col B to indicate that all Dimension Values are to be included.
Sample CSV file used to build Smart Folder Dataset
Sample Dataset for Smart Folder

Requirements for Smart Folder's source Dataset contents:

  1. Element ID
  2. Dimension Value ID
  3. Undimensioned Element
  4. No Dimension Value ID
  5. Dimensioned Element
  6. [-1] to signify ALL Dimension Values
Sample MySQL command for Smart Folder's source Dataset

For example, the Smart Folder has to show Top 10 most viewed Elements within the last 3 month interval. The required data can be sourced via SQL statement form the Dashboard DB system database. The query has to be the following:

SELECT element_id, segment_value_id as dim_value, count(*) as views
FROM dashboard_element_view_log_detail
WHERE DATE(view_time) >= current_date - interval 3 MONTH
GROUP BY 1,2 
ORDER BY 3 DESC
LIMIT 10
Click to copy

The Dataset can include other columns, they are optional and won't be used for Smart Folder setup.

The Dataset in the Editor should look like this:

After successful Update Data the viewer will display the collected values:

Columns element_id and dim_value are to be used for further Smart Folder setup.

For more MySQL queries for Smart Folders see our Knowledge Base article.

Create a Smart Folder

Smart Folders can only be created after a Dataset populated with the Element ID and, optionally, Dimension Values, has been established. When adding content to the Folder, the User can then decide to use the Dataset as a source.

  1. On the Add Folder popup, recached from the Folder Editor's Content tab via the Add Content button, choose option Populate Folder content "from Dataset"
  2. Select the Dataset containing the ID and Dimension Values of elements to be included in the Folder
  3. Choose the column in the Dataset where the Element ID can be found
  4. Optionally, choose the Dataset column in which selected Dimension Value ID can be found
  5. Click [Add Content]

The Folder Editor reopens and shows the elements specified in the Dataset, along with all selected Dimension Values.

Add a Burst from a Smart Folder

From the Smart Folder editor, open the Bursting tab and click the New Burst button;

  1. The new Burst Editor opens and pre-populates from the entire contents of the Smart Folder and defaults the Burst's Name to be the same as the Smart Folder.
  2. [Optionally] add the word "Burst" to distinguish it from the Smart Folder; or enter a complete new Burst Name
  3. Notice that the Contents of the Burst are the same as the Contents of the Smart Folder

All other functionality of the Burst are the same.

Delete Content from a Smart Folder

The ONLY way to changes the contents of a Smart Folder is to update the contents to the Dataset from which the Smart Folder is generated.  

  1. If the user clicks the Edit Burst Content button on the Burst created from the Smart Folder
  2. A popup is received explaining that the Burst will no longer be maintained by changes to the Smart Folder