Creating an Card Template Using Substitution

Context

A card template can contain a number of different types of information, from a variety of different sources. You have a combination of static text and tokens that are substituted at runtime.

For example you can add a section containing one of the following types:
  • Link URL: A Link URL allows you to add URLs for navigation to another application, which opens in a new tab. This option supports substitution.

  • Fiori Intent Navigation: A Fiori Intent Navigation can be used to navigate to other SAP Fiori launchpad applications.

  • Properties: This option can display data from a configured data source. For example, retrieve associated business data and display it in the table

  • Visualization: This option displays a thumbnail of the visualization and allows you to open it for viewing using the specified template.

Each of these types can contain different information.

Procedure

  1. From the card templates list, choose Add.
  2. Enter the name for the new template in the Template Name field.
  3. In the Card Design panel, choose the title for your card. Choose option Object Name to resolve the title at runtime to the name of the object from which the user has navigated. Alternatively, you can use Metadata Based, and press { to select the required metadata for the card title. You can enter the name with a mixture of static text and substitution tokens. The usage ID keys or metadata values are substituted at runtime. If you use token substitution when designing the template, the Usage ID and Metadata tabs in the right panel allows sample usage IDs and metadata values to be entered. These sample values are used when displaying the Card Preview panel.
  4. Choose Add Section and select the type of selection you require.
  5. In the Section Name field, enter the section name. All sections have a name. The name displays as an expandable heading for the section. The name field supports token substitution of usage ID and metadata values.
  6. In the Display Section Name field, indicate whether the section name isn’t displayed. If false, the section name is displayed, and the section content can’t be collapsed.
  7. In the Expand Section field, indicate whether the section is expanded when the card opens. If false, the user must expand the section to see the data.
  8. Choose Add Link URL, and add a display name and the appropriate linking information. Multiple links can be added. At runtime, links open in a new tab. The display name and the URL for the link both support token substitution.
    Type Description

    Link URL

    Adds URLs for navigation to another application, which opens in a new tab. This option supports substitution.

    1. Enter a Display Name for the link. This field supports token substitution.

    2. Enter the required URL.

    Fiori Intent Navigation

    To the user, the Fiori intent navigation looks very much like a link. However, the navigation is added to the Fiori history and back navigation is supported.
    1. Enter a Display Name for the link. This field supports token substitution.

    2. Enter the Semantic Object, Action, and parameters as required by the target application. See target app documentation.

    All these fields support token substitution.

    Properties

    Choose how to resolve the properties to load.

    Data Source: Enter the required data source from which to retrieve the information.

    Three methods are provided - choose one of the following:
    1. Metadata: Select the metadata field with a value containing the ID of the visualization to load.

    2. Usage ID: Select the usage ID to use for resolution. There’s an expectation that the usage ID is set on the node from which the user has navigated. For test purposes, set a sample usage ID in the sample data panel.
    3. Static Value. Manually enter the ID of the properties to load.

    Visualization

    Choose how to resolve the visualization to load. Three methods are provided - choose one of the following:
    1. Metadata: Select the metadata field with a value containing the ID of the visualization to load.

    2. Usage ID: Select the usage ID to use for resolution. There’s an expectation that the usage ID is set on the node from which the user has navigated. For test purposes, set a sample usage ID in the sample data panel.
    3. Static Value. Manually enter the ID of the visualization to load.

    Template: Enter the name of the display template to use when the user opens the visualization at runtime. If a template isn’t specified, the system uses the default for the type of content.

    Category: Only relevant if resolving by usage ID. This option helps to filter out visualizations in cases where there are multiple visualizations for the specified usage ID. If a category isn’t specified, it’s expected that only one visualization exists that has the usage ID specified.