Split report results that have special characters

Scenario

This recipe will allow you to separate report results based on a special characters included in the content.

In this example, a text separated by a hyphen ( - ) will be split into three separate columns.


Result


Recipe

Ingredients

Apps

Reporting
Platform
Data Center
Level

EASY

Estimated time

10 minutes

Macros

Suppliers

Storage format

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a new page named "Employee Directory".
  2. Create children pages under Employee Directory with this format: "Employee Name - Department - Date".
  3. In the "Employee Directory" page, create a Report Table macro.
  4. Within the Report Table, create a Content Reporter. Set the following parameters:
    1. Space: "@self"
    2. Types: "pages"
    3. Scope: "Employee Directory > children"
  5. Within the Content Reporter macro, create a Text Filter macro. Set the following parameters:
    1. Key: "title"
  6. Within the Report Table macro create a Report Column macro and set the following parameters:
    1. Title: "Employee Name"
  7. Within Report Column macro, create a Report Info macro. Set the following parameters:
    1. Key: "content:title > text:split with - > collection:1"
    2. Link to Item: Set to "checked".
  8. Within Report Table macro, create another Report Column macro and set the following parameters:
    1. Title: "Department"
  9. Within Report Column macro, create a Report Info macro. Set the following parameters:
    1. Key: "content:title > text:split with - > collection:2"
    2. Link to Item: unchecked
  10. Within Report Table macro, create the third Report Column macro and set the following parameters:
    1. Title: "Date Joined"
  11. Within Report Column macro, create a Report Info macro. Set the following parameters:
    1. Key: "content:title > text:split with - > collection:3"
    2. Link to Item: unchecked
  12. Click Save and publish the page.