Hyperlinking Catalog items

In the previous chapter we talked about 3 main types of Catalog items (datasets, web pages, and files) and how they can be retrieved. This chapter explains how catalog items can be hyperlinked in a way that closely resembles hyperlinking in web pages.

Item hyperlinking is a powerful technique that enables interconnecting and automating disparate data and systems, very much like web page hyperlinking enabled the world-wide web. You can browse related data in various systems, modify it, and trigger different actions with it right from the Catalog, just like you can browse various websites with a web-browser.

Item commands

Item hyperlinking is done with the help of item commands available in computed items of type "Dataset". In a nutshell, an item command simply retrieves another Catalog item, be it a dataset, a web page, or a file. A command can also trigger a workflow, a special item type that doesn't return anything and is explaned later in this chapter. There are 3 types of commands:

  • Row commands (invoked from a row)
  • Column commands (invoked from a column)
  • General commands (invoked from a dataset)

To add an item command, select "Add/edit commands" in the item's context menu (see image below).

Add/edit item commands

Row commands

A row command is invoked by right-clicking a cell value (see below). Usually, it retrieves another item that corresponds to the clicked value. For example, you can click an order number and retrieve a related dataset (item) that contains all the products in that order.

Row command

For such a command to work, the retrieved dataset: a) must be calculated (i.e. use a workflow to produce a result dataset), and, b) must have a parameter that is an order number. In the command properties, the parameter should be assigned with values of the column that contains order numbers.

Note that in the example described above, the orders can come from one system (e.g. CRM), but the list of products can be obtained from another (e.g. inventory). However, from the user perspective, it doesn't matter — all the required data is linked and is accessible with a single click, no matter where it's actually stored.

If a row command is defined in item settings, every row in the dataset will have exactly the same set of row commands. In other words, if a row command is available in one row, it's available in any other row of the same dataset. Row commands are quite flexible:

  • A row command can retrieve an item of any type (dataset, web page, file, etc.)
  • Different commands can be assigned to different row values (values in different columns of the same row)
  • A row command can use multiple values from the same row (and pass it as parameters to the retrieved item)
  • A row value can have multiple commands (as in the image above)
  • If a row command retrieves a web page, or a file (but not a dataset), or triggers a workflow, it can point to a module in the current item, instead of another item

Tip: Row commands of Catalog items are very similar to row commands of Launcher tasks.

Column commands

Columns commands, unlike row commands, operate with multiple rows at once. Similarly to a row command, a column command also retrieves another item and assigns its parameter(s) with values from the current dataset. However, a column command assigns to a parameter not a single value from a row, but all values of a particular column (separated by comma, by default, or another specified delimiter). In a typical use case, a dataset is retrieved and filtered in the Dataset Viewer (as described in the previous chapter). Then, for the selected subset of rows, a column command is applied.

For example, you can retrieve a list of orders, apply filters to only keep pending orders that haven't been paid for a week or longer, and then use a column command to send all of them at once a reminder about the pending payment.

Column commands are invoked by right-clicking a column header in the Dataset Viewer.

General commands

A general command also retrieves another item (of any type) but it is not linked to a cell or row. It is related to the (dataset) item in general. When general commands have been configured, they are available by pressing the "Execute command" button on the main toolbar of the Dataset Viewer. The parameter(s) of the item retrieved by a general command can be assigned with the paramater(s) of the current item (the item in which the command is configured). That's how you pass a context (e.g. a date) from one item to another.

Workflow items

Workflows are a special Catalog item type. It doesn't return anything, so technically it can't be "retrieved", it can only be "triggered". A workflow item simply runs an EasyMorph project. Like any computed item, a workflow item can assign project parameters before its execution.

Workflow items are typically used when you need to perform some kind of action, instead of retrieving data. For instance:

  • Send emails
  • Push data into a web API
  • Run a script or an external application

Advanced topics

Workflow commands can be used to add, delete, and modify data as explained in the video below. This allows building simple internal applications to automate various manual tasks, for example:

  • Managing reference lists
  • Manual correction of flaws in incoming data
  • Master data management
  • Approval workflows
  • System administration tasks
  • Interactive user interfaces for web APIs

Adding rows

Adding data is done with a general command because it's not related to any particular column or row (unless you need to insert a new row above or below particular row). Here is how you can do it:

  • Configure a general command that triggers a workflow that adds 1 row; new row values are provided via parameters
  • Leave the workflow parameters blank (i.e. assigned with empty text)
  • Tick the option "Always prompt for parameters" in the command settings — that would allow entering new row values
  • Tick the option "Re-retrieve dataset when the command finishes" — that would update the current dataset after a new row is added (otherwise the user won't see new data added after the command is finished)

Editing (updating data)

Editing data is done with a row command because it's related to a row. Each row must have a unique ID that unambiguously identifies the row, otherwise it won't be clear which exactly row should be updated. Do the following:

  • Configure a row command that triggers a workflow that updates a row (specified by some ID); new values are provided via workflow parameters
  • Assign the workflow parameters with columns in which values should be updated; at least one parameter should be assigned with a column with row IDs
  • Tick the option "Always prompt for parameters" in the command settings
  • Tick the option "Re-retrieve dataset when the command finishes" — that would refresh the current dataset after a new row is added (otherwise the user won't see any changes after the command is finished)

Deleting data

Deleting data is also a row command because it's related to particular row. Each row must have a unique ID that unambiguously identifies the row, otherwise it won't be clear which exactly row should be deleted. Do the following:

  • Configure a row command that triggers a workflow that deletes a row (specified by some ID); the workflow should have a parameter for row ID
  • Assign the workflow parameter with the columns that contains row IDs
  • Tick the option "Re-retrieve dataset when the command finishes" — that would refresh the current dataset after a row is releted (otherwise the user won't see any changes after the command is finished)

Tip: Workflows for adding, deleting, and updating data don't have to be separate Catalog items. Instead, they can be modules in the same workflow that is used by the item that returns a dataset..

Go to tutorial home