Screen Widgets

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

The pages that follow will help you build widgets in ASM. Below, is a list of known issues and details for accessing the API Query Builder

Widget Builder

You can build a string using the following interface:

https://[server]/[system]/modules/alemba.web.widgets/?widgetid=[widget name]

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

  • Replace [widget name] with one of the following:

    • data-grid

    • call-activities

    • global-search

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

Known Issues

Screen Designer

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

Grid Builder Syntax Error (10.6.7)

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"}],

Script Error when Clicking a row in Widget Results

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" }

Results Show Deleted Field Values

There is a known issue where the query 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'

Failed to Open Tasks

The widgets don't handle opening tasks due to mismatch between the entity type (base-task) and the review url (task). This is a issue in portal as well. If you are on-prem, and you need a quick fix, you can make the below change in InNavigation.js (Cloud clients will need to contact Alemba Support):

function HandleWidgetNavigation(data/*: {viewType: 'details'|'cti'|'search', entityType: 'call'|'request'|string, entityId?: number, telephoneNo?: string, filters?: {UserId:number}*/) {
    switch (data.viewType) {
        case 'details':
/*Alemba custom - Fix for task widget starts*/
    {
      if(data.entityType === "base-task")
      {
        eWrapperEvent('review' + "task" + data.entityId);
      }
      else
    /*Alemba custom - Fix for task widget Ends*/      
            eWrapperEvent('review' + data.entityType + data.entityId);
            break;
/*Alemba custom - Fix for task widget Starts*/  
    }
    /*Alemba custom - Fix for task widget Ends*/
        case 'cti':
            return OpenMMA(101, data.telephoneNo, null);
        case 'search':
            var Builder = new DrilldownXmlBuilder();
            Builder.AddQDValue("USER_REF", CallRootTypeRef, data.filters.UserId, "cti user", true);
            Builder.AddRefValue("PARTITION", CallRootTypeRef, wrapper.CurrentPartition, true);
            Builder.AddRefValue("OPEN_FLAG", CallRootTypeRef, "1,2,3", true);
            var DrilldownXml = Builder.ToXml();
            return CallSearch(DrilldownXml, "", false, "LoggingUserId=" + data.filters.UserId);
        default:
            throw new Error("navigation type not supported");
    }
}

Last updated