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
- Create a new TypeScript function onCardViewChosen in /src/webui/clientlogic/_export/tapp/DataViewTest.ts
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
- Open your screen with Dataview
- select your dataview controll and adjust the attribute (choose one of the two options):
- For Double Click:
EventRowChosen = #.onCardViewChosen(eventSource);
- 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.
Back to Use Cases
Back to Build.One Help-Center Home