Create a widget - HxGN SDx - Update 64 - Administration & Configuration

Administration and Configuration of HxGN SDx

Language
English
Product
HxGN SDx
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

Hexagon University Icon eLearning is available for this topic. Check it out here: HxGN SDx® | InsightViews - Create a Widget

Widgets are created as part of the procedure for creating a new dashboard. For more information, see Create a dashboard. Once you have created a widget, you can preview the widget by hovering over it and selecting eye. Widgets aren't previewed if they rely on an object to be selected first.

Some example widgets are also provided and can be added to a dashboard as described in Create a dashboard.

What types of widget can be created?

Widget type

Description

Chart

A chart widget displays returned data in a chart view. A chart can be configured so that clicking on a section of the chart displays the related data in a grid in a second page.

Count

A count widget displays a count of the number of results returned, with the details in a grid in a second page.

Form    

A form widget displays returned data in a form.

SHARED Tip You can change a form widget to show the data in a list or in a tile. You can also sort and filter the data displayed.

Grid    

A grid widget displays returned data in columns similar to the Results page.

IFrame    

An iframe widget displays another web page.

A user name and password might be required to log on to the external web page when an iframe widget is viewed in a dashboard.

Spotlight

A spotlight widget displays one item of returned data scaled to fit the widget.

To Do List

A To Do List widget displays a summary of your To Do List. You can switch between displaying tasks by configuration or object type, at the bottom of the widget.

QuickAccess3DFilter

A 3D Quick Access widget displays a list of the filters that you have access to. Click > View and Markup next to a filter to open the related 3D model.

This widget is available only for 3D Project As-Built databases.

The number of objects shown in a widget grid page may differ from the number shown in a results page. This is because the widget uses the API Services Default Query Page Size setting for its default size, rather than the SDx Web Client default page size setting. For more information, see Server Manager Site Properties and Settings. When displaying data from a remote SDx site, the widget will use the setting from the remote site.

How do I create a widget that connects to a remote SDx site using Smart API Manager (SAM)?

  1. On the remote SDx site, in Smart API Manager (SAM):

    1. Create a new user with the same name as an existing user on the local HxGN SDx site. For information on how to create a new user in SAM, see Register a new user.

    2. Add the user to the group that has access to the SDx site. For more information, see Add a user to a group.

    3. Find the Smart API for the site, and make a note of the Resource Identifier. For more information, see Find a Smart API.

    4. Create a Smart Client to impersonate the user created above. Make a note of the Client ID and Client Secret for the Smart Client. For information on how to create a new Smart Client, see Register a new Smart Client.

  2. On the local HxGN SDx site:

    1. Create an authorization server for the remote SDx site. For example, [https://RemoteSDxSiteURL.com]/sam/oauth/connect/token. For more information, see Create an authorization server.

    2. Create a remote Web API for the remote SDx site ensuring you select the authorization server for the remote SDx site, and use the information you noted above. Set:

      • Oauth Resource ID to the Resource Identifier of the Smart API.

      • Oauth Client ID to the Client ID from the Smart Client.

      • Oauth Client Secret to the Client Secret from the Smart Client.

      • OAuth Scopes to ingr.api.

    For more information, see Create a Web API.

    1. Follow the steps for creating a widget, ensuring you select the Web API for the remote SDx site.

    SHARED Tip If you want the widget to use a specific configuration, we recommend controlling this with a request header. For an example, see Example request headers.

How do I create a widget using a new API entry point group?

You may want to create a widget using a new API entry point group as it allows you finite control over columns sets, entry points, and relationships.

  1. Create a new API entry point group with the required API entry points. For more information, see Create an API Entry Point group.

  2. Create a web API to use the API entry point group. For more information, see Create a Web API.

  3. Create a widget that uses the new web API.

You can have only one To Do List widget and one 3D Quick Access widget created in the system at a time. If a To Do List widget or a 3D Quick Access widget already exists, you cannot create another one.

Widgets are created in the Create Widget wizard, which displays the items used to configure the widget in separate tabs.

  1. Complete the tabs to create the widget as follows:

    The tabs displayed vary depending on the type of widget you are creating.

    1. Properties

      • Type a name and title for the widget. The Title is displayed at the top of the widget box.

      You can't modify the widget name once the widget is created. The widget name can't contain spaces. If you plan to link to this widget from another widget, or you are creating a chart widget with related data displayed in a second page, you can use only alphanumeric characters (and underscores) in the widget name.

      SHARED Tip You can also enter a description to help identify this widget.

    2. Control

      • Select the type of widget to create.

      The tabs that are available in the remainder of the wizard will change to suit the type of widget selected.

    3. Form Properties

      This tab is only available if you are creating a form widget.

      • Select whether to initially display the information in a tile or a list layout.

      Tile layout example

         

      List layout example

      Form widget, Tile view

         

    4. API

      1. Select the required Web API.

      2. If a local Web API is used, and you want the user to be able to change the scope for this widget, select Allow SDx scope selection to be changed. The default scope will be the user's create scope in a home screen, or the object's scope in a dashboard.

        SHARED Tip You can force a widget to use a specific configuration using a request header. For an example, see Example request headers. We recommend using a request header to control the configuration when connecting to a remote site.

    5. Headers

      • If required, search for the request header to use with this widget.

      For information about request headers, see Create a request header.

    6. Custom Variables

      • If required, use the Build URL using variables control to use a variable to build the URL.

        You have two options:

        • Define a variable to use in a URL

        • Retrieve a URL from a property (available for iframe widgets only)

      • With the exception of CURRENT_OBJECT_ID, HxGN SDx environment variables are not supported in widgets.

      • Variables should always use upper case.

      Define a variable to use in a URL

      Variables defined in this way can be used only in the widget they are defined in. Variables are always defined against the local data source and not the Web API selected in the widget.

      1. Select Define a variable to use in a URL.

      2. Type a name for the variable in Variable alias. For example, TAGNAME.

        You cannot include WIDGET_ in your variable name as this is reserved for use in widget dependencies.

      3. Type the value to assign to the variable in Variable definition. For example, Tags({{CURRENT_OBJECT_ID}})?$select=Name.

      4. Use the Variable alias in the URL to return the required data. For example, Tags?$filter=Name eq '{{TAGNAME}}'.

        For more information on the parameters you can use in this URL, see Supported URL parameters.

      Retrieve a URL from a property

      This option is available only for iframe widgets.

      1. Select Retrieve a URL from a property.

      2. Type the location of the property that will return the required URL.

        For more information on the parameters you can use for this, see Supported URL parameters.

    7. URL

      This functionality was modified in an update. For more information, see Create a widget (modified in an update).

      • With the exception of CURRENT_OBJECT_ID, HxGN SDx environment variables are not supported in widgets.

      • Variables should always use upper case.

      • For a count or grid widget using a local Web API, the Actions menu will be available if the Name, Config, and ID are all returned, and the widget is displayed in a full page dashboard (rather than a pop-up window). The ID column is hidden by default in the results.

      • If you want to filter using an enumerated property, for example the document type, use the Name of the property and not the Display Name in the URL.

      • As the URL is completed, it is checked to ensure it is syntactically valid. A warning is shown if there are any issues. You can still finish creating the widget as the error may be due to permissions issues, which will not affect the widget when it is used. However, you cannot finish creating the widget if the URL is blank, groupby is not set for a chart widget, or the defined custom variable has not been used.

    8. Todo List

      This tab is only available if you are creating a To Do List widget.

      • Select the tab to show when the widget is first displayed. The default is Configuration.

    9. Chart Options

      This tab is only available if you are creating a chart widget.

      1. If you are creating a chart that groups data by a date or YMD property:

        1. Use Aggregate by to group the data by day, month, or year.

        2. Select Show Cumulative Line to add a line to your chart showing the total number of objects in each group.

          A cumulative line is only displayed for bar charts.

      2. Select the type of chart to use when the widget is first displayed. The available chart types depend on the options selected:

        Chart option selected

        Chart types available

        Aggregate by

        Line and Bar

        Show Cumulative Line

        Bar

        None

        Doughnut, Line, and Bar

        Unless a cumulative line is used, the user can change the chart type when they are viewing the widget.

    10. Drill Down URL

      This tab is only available if you are creating a chart widget.

      • To configure the chart widget so that clicking on a section of the chart displays the related data in a grid in a second page, select Configure a drill down URL.

      SHARED Tip You can click link-settings to use a wizard to modify the URL. For more information on the wizard, see Complete the URL using a wizard.

  2. On the Summary tab, check the details selected in the widget.

    SHARED Tip To update a setting, click on the applicable tab and update the setting, as necessary.

  3. Click Finish to save the widget.