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.
- Automatically populate Folders with a large number of Elements instead of adding each Element manually.
- Allow the Smart Folder's content to be controlled by the Dataset's values.
- 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.
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:
- Element ID (number following element)
- 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:
- 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.
- Row 2 and all subsequent rows MUST have a value in Col A that is element ID.
Col B is used to specify the Dimension Values for a Dimensioned element to those that are explicitly included in the Dataset.
- If the Element is undimensioned, no value is required in Col B.
- If only selected Dimensions from the Dimensioned Element are to be included, the appropriate Dimension Value IDs are entered in Col B.
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.
Requirements for Smart Folder's source Dataset contents:
- Element ID
- Dimension Value ID
- Undimensioned Element
- No Dimension Value ID
- Dimensioned Element
- [-1] to signify ALL Dimension Values
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
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:
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.
- 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"
- Select the Dataset containing the ID and Dimension Values of elements to be included in the Folder
- Choose the column in the Dataset where the Element ID can be found
- Optionally, choose the Dataset column in which selected Dimension Value ID can be found
- 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;
- 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.
- [Optionally] add the word "Burst" to distinguish it from the Smart Folder; or enter a complete new Burst Name
- 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.
- If the user clicks the Edit Burst Content button on the Burst created from the Smart Folder
- A popup is received explaining that the Burst will no longer be maintained by changes to the Smart Folder