Building Screen Widgets

While ASM ships with numerous widgets, you can also create your own and put them Nano, Core and on the portal.

The widget can be found in Screen Designer and is configured with the following string properties.

The example below uses the Person screen, but these widgets can be placed on any screen in ASM if you modify the properties - See the API documentation for more information.

Adding a Widget to your Screen - Widget Properties

When you first add a widget to the screen it will appear as a solid grey box that spans all columns. You cannot resize the columns.

After you have added your widget:

  1. Highlight the widget so it has the focus

  2. Set the Widget id to "data-grid"

  3. Enter your widget properties (see known issues and examples below).

Caution

These fields are case sensitive. They must be all lower case without spaces unless specified otherwise.

API Data Grid Query Builder

You can build a string using the following interface:

https://[server]/[system]/alemba.web.widgets/?widgetid=data-grid

  • Replace [server]/[system] with your specific system URL.

  • You will need some knowledge of the API to modify the string properties by screen/entity.

Sample Widgets

Person Screen: Users Assigned Assets/Configuration Items

{"entityType":"configuration-item","navigationEntityType":"asset","columns":"Ref,Name,Type:InfraEntityType.Name, Manufacturer:Manufacturer.Name,ModelType:ModelType.Name","headers":",Assigned Assets, Type,Manufacturer,Model","filters":"!@IsDeleted","sorting":"off","pageFilters":"[{\"id\":\"REF\",\"apiId\":\"User\"}]","orderBy":"","sortBy":""}

Person Screen: Users Assigned Software where the person is a stakeholder

{"entityType":"person-to-asset-stakeholder-link","navigationEntityType":"asset","columns":"Ref:Target.Ref,Asset:Target.Name,ModelType:Target.ModelType.Name,Type:Target.InfraEntityType.Name","headers":"Assigned Applications,Module,Type","filters":"!@IsDeleted","sorting":"on","pageFilters": "[{\"id\":\"REF\",\"apiId\":\"Holder.Ref\"}]","orderBy":"Target.InfraEntityType.Name","sortBy":"Model"}

Task Screen: Config items belonging to a user

{"entityType": "configuration-item", "navigationEntityType":"asset","columns": "Ref:Target.Ref, Type:InfraEntityType.Name, Manufacturer:Manufacturer.Name, ModelType:ModelType.Name", "headers": ",Title, Type, Manufacturer, Model", "filters": "", "sorting": "off", "pageFilters": "[{\"id\":\"REQUEST:REQUESTOR_REF\",\"apiId\":\"User\"}]", "orderBy": "", "sortBy": ""}

Portal homepage: Show the calls awaiting your action and any that are open/resolved open/unresolved

{"entityType":"call","navigationEntityType":"call","Ref:Target.Ref",columns":"Ref,CreatedDate,ShortDescription,Product:ConfigurationItem.Name,Status:CallStatus.Name","headers":"No.,Date Raised,Description,Product,Status","sorting":"on","filters":"UserId%20%3D%3D%20%40UserId%26%26(OpenStatus=1%7C%7COpenStatus=2%7C%7COpenStatus=3)%26%26CallStatus.IsAwaitingAction=1"}

Known Issues

There is a known issue where the quety results may return deleted field values and records since the query will pull everything. To counter this, add the following to your widget properties:

Status=='A'&&Target.Status=='A'

There is a known issue with widgets wherein you will need to add the following to the widget properties to make the data in the widget "clickable":

"navigationEntityType": "asset"

Ref:Target.Ref

Example:

{ "entityType": "person-to-asset-stakeholder-link",

"navigationEntityType": "asset", "columns": "Ref:Target.Ref,Asset:Target.Name,Type:Target.InfraEntityType.Name", "headers": ",Asset,Type", "filters": "!@IsDeleted", "sorting": "off", "pageFilters": "[{\"id\":\"REQUESTOR_REF\",\"apiId\":\"Holder.Ref\"}]", "orderBy": "Target.InfraEntityType.Name", "sortBy": "Type" }

There is a Known Issue with syntax where if you use the API data-grid query builder, and then use the "copy code" button in 10.6.7, it puts in the incorrect syntax (Slashes and spaces) into the code breaking the widget on lower versions. It also stops any widgets showing on the page.

Example:

Copied Code: "pageFilters": "[{\"id\":\"REF\",\"apiId\":\"Holder.Ref\"}]",

Should be

"pageFilters":[{"id":"REF","apiId":"Holder.Ref"}],

Even though you will see a resize option in screen designer, for widgets, this option is not viable.