Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Open Screen with a single click of a Card View

    icon
    This Use Case describe how to launch screens by clicking in the tile of a Card View
    • 1. Summary
    • 3. Step by Step Guide
    • 3.1 Create the function
    • 3.2 Adjust the Card View Object
    • 3.3 Trim and Launch
    • Documentation

    1. Summary

    Card View allow to have speficic funcionality or logic in the Tiles, in this Use Case it will be described how to launch a Screen by clicking in a tile.

    3. Step by Step Guide

    3.1 Create the function

    1. Create a new TypeScript function onCardViewChosen in /src/webui/clientlogic/_export/tapp/DataViewTest.ts
    2. export function onCardViewChosen(eventSource: akioma.swat.DataView) {
        console.log(eventSource);
        akioma.swat.App.loadScreen({
          containerName: 'nameOfScreenToOpen',
          repositionTo: (<akioma.swat.DataSource>eventSource.getLink('DATA:SRC')).getValue('[uniqueObjectId]')
        });
      }

      You can find the uniqueObjectId within your related entity in the attribute PrimaryUniqueFields

    3.2 Adjust the Card View Object

    1. Open your screen with Dataview
      1. select your dataview controll and adjust the attribute (choose one of the two options):
        1. For Double Click: EventRowChosen = #.onCardViewChosen(eventSource);
        2. For Single Click: EventRowSelected = #.onCardViewChosen(eventSource);

    3.3 Trim and Launch

    In the Workspace console b1 trim , make a hard reload and launch you screen

    Documentation

    To find more information, you can check the following documentation.

    Card ViewCard View

    Back to Use CasesUse Cases

    Back to Build.One Help-CenterBuild.One Help-Center Home

    Logo