Flexmonster MCP Server is here! Connect your ✨AI assistant to our documentation. Get started
+

How do I programmatically call a submenu item's handler function?

Answered
Jon Jon asked on March 1, 2019

I assume there is, but my Javascript knowledge is lacking a bit: Is there a way to programmatically call a submenu's handler function? I'm trying to set up some predefined report profiles and a few of them require the "% of Row" Aggregation item to be selected by default. Please refer to the image for context.
Sidenote: I'm using the Angular integration of the Microsoft Analysis Services version of the Flexmonster tool.

Attachments:
submenu-example.png

1 answer

Public
Dmytro Zvazhii Dmytro Zvazhii ⋅ Flexmonster ⋅ March 4, 2019

Hello Jon,
Thank you for writing to us.
The submenu can be opened programmatically by dispatching an appropriate event. Here is the jsfiddle example: https://jsfiddle.net/flexmonster/sgpb6cdu/.
Please note, that there is no need to open the context menu for pre-setting "% of Row" aggregation.
You can set the appropriate aggregation in the slice object and then apply it by using our setReport() API call. Please find more information here: https://www.flexmonster.com/api/slice-object/, https://www.flexmonster.com/api/setreport/.
Let us know in case of any other question.
Regards,
Dmytro

Please sign in or register to submit your answer