i4designer Knowledgebase

i4designer Replacement parameters

Abstract

Check out this step-based tutorials and learn more details on how to use the i4designer replacement parameters in various scenarios requiring placeholders.

Using i4connected standard replacement parameters
Abstract

Check out this tutorial and learn how to set up an i4designer project using the i4connected standard replacement parameters in order to parse some data in your visualizations.

The current i4connected application mappings infrastructure allows defining i4designer applications, connecting them via direct publishing update linking them to the following entities available on the i4connected platform:

  • Sites

  • Areas

  • Organizational Units

  • Devices

When linking the applications to an entity, the user has the possibility to pass a set of standard or custom parameters to the application. These parameters can be used in the application to parameterize various components.

This tutorial will guide you through the needed steps to use i4connected standard parameters to replace the Name and ID of multiple i4connected Sites, while using one single application mapping.

  1. Open an i4connected platform project in design mode.

  2. Open the Toolbox panel and drag two Label components on your page.

    Laabel_components.jpg
  3. We shall use the first Label component to inject the siteId parameter. Double click the first Label component in order to open the Properties panel and proceed with the following settings:

    1. Search for the Default text property and type in following syntax: siteId=[I4C_SITE_ID].

      Default_text_1.jpg

      Note

      The standard replacement parameter I4C_SITE_ID needs to be added between square brackets.

      Besides that, the user is free to add any additional text. For example:

      • This is the identification number of the Site -> [I4C_SITE_ID]

      • [I4C_SITE_ID]

    2. Proceed with any other styling, appearance, typography or security settings and make sure you save your changes.

  4. The second Label component will be used to inject the siteName parameter. Double click the second Label component in order to open the Properties panel and proceed with the following settings:

    1. Search for the Default text property and type in following syntax: siteName=I4C_SITE_NAME.

      Default_text_2.jpg

      Note

      The standard replacement parameter for the name of the site is I4C_SITE_NAME. Besides that, the user is free to add any additional text. For example:

      • This is the name of the Site -> I4C_SITE_NAME

      • I4C_SITE_NAME

    2. Proceed with any other styling, appearance, typography or security settings and make sure you save your changes.

  5. Build and publish your i4designer project.

    Tip

    For more details about building and publishing i4designer projects, to an i4connected environment, please also refer to our tutorials here.

After processing all these steps, you can create an i4connected application and link it to several Sites. When opening these sites, the application will resolve the standard parameters and will replace them with their corresponding values:

Site_1.jpg
Site_2.jpg

Example of two different Sites using the same application.