cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

how to get mashup name from menu widget

menayat
6-Contributor

how to get mashup name from menu widget

Hey All,

 

I have two questions.

1. I have the menu in my master and I want the details of the selected menu.

2. Can I have the mashup name of a selected menu from the menu widget? If yes then how.

 

Please provide me the right answer.

 

Thank you.

7 REPLIES 7
slangley
23-Emerald II
(To:menayat)

Hi @menayat.

 

We're not understanding the use case.  Can you please provide a mock-up of what you would like to see along with further details of your use case?

 

Regards.

 

--Sharon

menayat
6-Contributor
(To:slangley)

Hi,

 

Suppose I have the menu in my master. The menu is like electronics, groceries, and vegetables in horizontal. 

Now the question is simple. How can I get the detail of the selected menu?


If I select groceries then I want to know the details of the grocery menu like 


menu .linkDestination = "MainMash";
menu .parentMenuId = "TotalCareMenu";
menu .menuId = "TotalCareMenu_0";
menu .isDefault = "true";
menu .imageURL = "";
menu .linkTarget = "Self";
menu .description = "";
menu .linkType = "Mashup";
menu .title = "[[MAP]]";

Thank you. 


Rajesh_Sayana
13-Aquamarine
(To:menayat)

Hi, the menu widget has a Mashup property which we can bind to other widgets or a service. This property gives us the Mashup name selected from the Menu item. Please refer to the below screenshot.

Rajesh_Sayana_0-1587736941913.png

Hope this helps.

menayat
6-Contributor
(To:Rajesh_Sayana)

Thank you for your concern but I'm not able to achieve what I want.

I bind this mashup(which you display in the screenshot) with my service parameter but I'm not getting anything.
I checked with the logger it is showing undefined.

I got one more way. Menu > Service > GetEffectiveMenu with All Data of this service I'm getting all menu data.

But I need only the selected row. Like the menu, the name is Menu1, Menu2 & Menu3 is written If clicked on Menu2 then I want every detail of Menu2 like mashup name, parentID, menuId, and other details.

But with this service, I'm not getting the details of selected rows.


Thank you.

slangley
23-Emerald II
(To:menayat)

Hi @menayat.

 

What is your use case?  If we understood more regarding your requirements, we might be able to suggest a solution.

 

Regards.

 

--Sharon

menayat
6-Contributor
(To:slangley)

HI @slangley,

Ok, I'm explaining to you. 
I have a dynamic menu in which I'm loading AllData from a service. In this menu, I have 3 items or you can say 3 rows. So as you know these 3 rows will become 3 menus.
So my question is simple I want to make the first map is byDefault selected.
My codes are here.


var row = new Object();
row.isDefault = true;
row.parentMenuId = "";
row.imageURL = "";
row.description = "";
row.menuId = "Menu";
row.linkType = "Menu";
row.title = "";
result.AddRow(row);

 

row = new Object();
row.linkDestination = mainMash;
row.parentMenuId = "Menu";
row.menuId = "Menu_0";
row.isDefault = true;                                            // I make it true by after that also it's not working.
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "[[MAP]]";
result.AddRow(row);

 

row = new Object();
row.linkDestination = "ReportsMash";
row.parentMenuId = "Menu";
row.menuId = "Menu_1";
row.isDefault = false;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "[[REPORTS]]";
result.AddRow(row);

 

row = new Object();
row.linkDestination = "SettingsMash";
row.parentMenuId = "Menu";
row.menuId = "Menu_2";
row.isDefault = false;
row.imageURL = "";
row.linkTarget = "Self";
row.description = "";
row.linkType = "Mashup";
row.title = "[[SETTINGS]]";
result.AddRow(row);

 

now please tell me how to make default selected.

slangley
23-Emerald II
(To:menayat)

Hi @menayat.

 

This seems to be a different question, but there is an option to set the default menu during creation. 

 

Regards.

 

--Sharon

Announcements


Top Tags