<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Submenu not loading, when menu generated from a service and linked to Menu widget in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/751457#M54760</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;As I understand from the details, you would like to load a Sub Menu from Menu Item&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'Chiller Page'. To do this we would need to add 1 more row in this service code and set its parentMenuId to 'idAllSites' which is the menuId of 'Chiller Page'. And you would also need to change parameters of 'Chiller Page' as - remove linkDestination, make&amp;nbsp;linkTarget blank instead of Self, set linkType to 'Menu' instead of Mashup&lt;BR /&gt;I have modified this code to add a Sub menu under 'Chiller Page', copying it below. Bind this to Menu widget, it should be able to load the Sub Menu under 'Chiller Page'&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({&lt;BR /&gt;infoTableName: "InfoTable",&lt;BR /&gt;dataShapeName: "MenuEntry"&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;menuId: 'topMenu',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Main_Utility_Dashboard',&lt;BR /&gt;isDefault: true,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Home_style_twaek_icon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '1',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Monitor'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'dashboard_style_twaek_icon',&lt;BR /&gt;linkTarget: '', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idLogs',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;title: 'Utilities'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;//linkDestination: 'Chiller_HomePage',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'idLogs',&lt;BR /&gt;imageURL: 'TransparentIcon',&lt;BR /&gt;linkTarget: '', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idAllSites',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;title: 'Chiller Page'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Chiller_HomePage_SubMenu',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'idAllSites',&lt;BR /&gt;imageURL: 'TransparentIcon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idAllSitesSubMenu',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Chiller Page SubMenu'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'PTC.SCA.SCO.AssetMonitor.AssetList.AssetListContainerMashup_Lupin',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Asset_list',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '3',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Asset List'&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;Let us know if it helps.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Oct 2021 00:36:20 GMT</pubDate>
    <dc:creator>ragrawal2</dc:creator>
    <dc:date>2021-10-05T00:36:20Z</dc:date>
    <item>
      <title>Submenu not loading, when menu generated from a service and linked to Menu widget</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/751327#M54736</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written a service with output data shape&amp;nbsp;MenuEntry. The output of this service is linked to a menu widget.&lt;/P&gt;
&lt;P&gt;The menu data and the icons are loading, but the submenus are not loading. I refered the service writing method from the following link:&lt;A href="https://support.ptc.com/help/thingworx/platform/r9/en/#page/ThingWorx/Help/Mashup_Builder/Widgets/MenuBarDefiningtheMenuBarItemsUsinganInfotable.html" target="_blank"&gt;https://support.ptc.com/help/thingworx/platform/r9/en/#page/ThingWorx/Help/Mashup_Builder/Widgets/MenuBarDefiningtheMenuBarItemsUsinganInfotable.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, sharing my code for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({&lt;BR /&gt;infoTableName: "InfoTable",&lt;BR /&gt;dataShapeName: "MenuEntry"&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;menuId: 'topMenu',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Main_Utility_Dashboard',&lt;BR /&gt;isDefault: true,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Home_style_twaek_icon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '1',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Monitor'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'dashboard_style_twaek_icon',&lt;BR /&gt;linkTarget: '', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idLogs',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;title: 'Utilities'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Chiller_HomePage',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'idLogs',&lt;BR /&gt;imageURL: 'TransparentIcon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idAllSites',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Chiller Page'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'PTC.SCA.SCO.AssetMonitor.AssetList.AssetListContainerMashup_Lupin',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Asset_list',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '3',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Asset List'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here the 'Utilities' is showing in the main menu but is submenu 'Chiller Page' is not dropping down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;SriH&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 09:59:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/751327#M54736</guid>
      <dc:creator>SriH</dc:creator>
      <dc:date>2021-10-04T09:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Submenu not loading, when menu generated from a service and linked to Menu widget</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/751457#M54760</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;As I understand from the details, you would like to load a Sub Menu from Menu Item&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;'Chiller Page'. To do this we would need to add 1 more row in this service code and set its parentMenuId to 'idAllSites' which is the menuId of 'Chiller Page'. And you would also need to change parameters of 'Chiller Page' as - remove linkDestination, make&amp;nbsp;linkTarget blank instead of Self, set linkType to 'Menu' instead of Mashup&lt;BR /&gt;I have modified this code to add a Sub menu under 'Chiller Page', copying it below. Bind this to Menu widget, it should be able to load the Sub Menu under 'Chiller Page'&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape({&lt;BR /&gt;infoTableName: "InfoTable",&lt;BR /&gt;dataShapeName: "MenuEntry"&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;menuId: 'topMenu',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Main_Utility_Dashboard',&lt;BR /&gt;isDefault: true,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Home_style_twaek_icon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '1',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Monitor'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'dashboard_style_twaek_icon',&lt;BR /&gt;linkTarget: '', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idLogs',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;title: 'Utilities'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;//linkDestination: 'Chiller_HomePage',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'idLogs',&lt;BR /&gt;imageURL: 'TransparentIcon',&lt;BR /&gt;linkTarget: '', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idAllSites',&lt;BR /&gt;linkType: 'Menu',&lt;BR /&gt;title: 'Chiller Page'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'Chiller_HomePage_SubMenu',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'idAllSites',&lt;BR /&gt;imageURL: 'TransparentIcon',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: 'idAllSitesSubMenu',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Chiller Page SubMenu'&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;result.AddRow({&lt;BR /&gt;linkDestination: 'PTC.SCA.SCO.AssetMonitor.AssetList.AssetListContainerMashup_Lupin',&lt;BR /&gt;isDefault: false,&lt;BR /&gt;parentMenuId: 'topMenu',&lt;BR /&gt;imageURL: 'Asset_list',&lt;BR /&gt;linkTarget: 'Self', // (Popup, Mashup, New)&lt;BR /&gt;description: '',&lt;BR /&gt;menuId: '3',&lt;BR /&gt;linkType: 'Mashup',&lt;BR /&gt;title: 'Asset List'&lt;BR /&gt;});&lt;BR /&gt;&lt;BR /&gt;Let us know if it helps.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Oct 2021 00:36:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/751457#M54760</guid>
      <dc:creator>ragrawal2</dc:creator>
      <dc:date>2021-10-05T00:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Submenu not loading, when menu generated from a service and linked to Menu widget</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/752235#M54826</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code worked fine. But its creating menu(Chiller page submenu) under submenu(Chiller Page). Like,&lt;/P&gt;
&lt;P&gt;- Utilities&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; -Chiller Page&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-Chiller 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-Chiller 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But i needed,&lt;/P&gt;
&lt;P&gt;-Utilities&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; -Chiller 1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; -Chiller 2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I changed the code accordingly and its working fine as I needed. But the edited code is same as the one which was not working, not sure what was the issue before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the support,&lt;/P&gt;
&lt;P&gt;SriH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 04:49:50 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/Submenu-not-loading-when-menu-generated-from-a-service-and/m-p/752235#M54826</guid>
      <dc:creator>SriH</dc:creator>
      <dc:date>2021-10-08T04:49:50Z</dc:date>
    </item>
  </channel>
</rss>

