|
|
Click Execute to preview the returned output infotable from the data service.
|
|
Field Definition
|
Description
|
Base Type
|
Primary Key
|
|---|---|---|---|
|
linkDestination
|
Sets the type of item to link to. You can set the value to URL or Mashup.
|
STRING
|
Yes
|
|
isDefault
|
Displays the item automatically when the menu bar is viewed at run time. You can only configure one item as default.
|
BOOLEAN
|
No
|
|
parentMenuId
|
The ID of the parent menu item to assign the item to. Leave this field empty to display the item as a top-level menu.
|
STRING
|
No
|
|
imageURL
|
The name of the Media entity to use as an icon for the item.
|
IMAGELINK
|
No
|
|
linkTarget
|
Controls how the link target opens when linkType is set to Hyperlink.
• Popup—Opens the link in a pop-up browser window.
• New—Opens the link in a new browser tab.
• Replace—Replaces the page on the current tab.
• Empty—Replaces the current window.
|
STRING
|
No
|
|
description
|
An optional field that contains a description of the menu item.
|
STRING
|
No
|
|
menuId
|
A unique identifier for the menu item.
|
STRING
|
No
|
|
linkType
|
The supported values are: Hyperlink, Mashup, Menu, or Logout.
|
STRING
|
No
|
|
title
|
The text to display for the linked item on the menu bar.
|
STRING
|
Yes
|
let result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({
infoTableName: "InfoTable",
dataShapeName: "MenuEntry"
});
result.AddRow({
menuId: 'topMenu',
linkType: 'Menu',
});
result.AddRow({
linkDestination: 'OverviewMashup',
isDefault: true,
parentMenuId: 'topMenu',
imageURL: 'Dashboard',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idOverview',
linkType: 'Mashup',
title: 'Overview'
});
result.AddRow({
linkDestination: '',
isDefault: false,
parentMenuId: 'topMenu',
imageURL: 'TableView',
linkTarget: '', // (Popup, Mashup, New)
description: '',
menuId: 'idLogs',
linkType: 'Menu',
title: 'Logs'
});
result.AddRow({
linkDestination: 'AllSitesMashup',
isDefault: false,
parentMenuId: 'idLogs',
imageURL: 'SiteIcon',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idAllSites',
linkType: 'Mashup',
title: 'All Sites'
});
result.AddRow({
linkDestination: 'Site1Mashup',
isDefault: false,
parentMenuId: 'idLogs',
imageURL: 'SiteIcon',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idSite1',
linkType: 'Mashup',
title: 'Site 1'
});
result.AddRow({
linkDestination: 'Site2Mashup',
isDefault: false,
parentMenuId: 'idLogs',
imageURL: 'SiteIcon',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idSite2',
linkType: 'Mashup',
title: 'Site 2'
});
result.AddRow({
linkDestination: 'Site3Mashup',
isDefault: false,
parentMenuId: 'idLogs',
imageURL: 'SiteIcon',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idSite3',
linkType: 'Mashup',
title: 'Site 3'
});
result.AddRow({
linkDestination: '',
isDefault: false,
parentMenuId: 'topMenu',
imageURL: 'DevicesIcon',
linkTarget: '', // (Popup, Mashup, New)
description: '',
menuId: 'idDevices',
linkType: 'Menu',
title: 'Devices'
});
result.AddRow({
linkDestination: 'SearchMashup',
isDefault: false,
parentMenuId: 'topMenu',
imageURL: 'Search',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'idSearch',
linkType: 'Mashup',
title: 'Search'
});
|
|
The returned infotable is implemented using the RootEntityList Data Shape.
|
thingsList.rows.toArray().forEach(row => {
result.AddRow({
linkDestination: row.homeMashup,
isDefault: false,
parentMenuId: 'idDevices',
imageURL: 'DeviceIcon',
linkTarget: 'Mashup', // (Popup, Mashup, New)
description: '',
menuId: 'id' + row.name,
linkType: 'Mashup',
title: row.name
});
});

