Adding a Right-Click Popup Menu in Dodeca

A pop-up menu is a convenient way to add functionality to your Dodeca View.  One way it is often used is to navigate to another view while bringing all the context relevant information with it from the original view.  Dodeca makes this very easy because it automatically captures all of this contextual information.

For example, if you are in a planning view, or any view where information is sent to an Essbase cube, Dodeca already knows all the Dimensions defined for a particular cell.  This makes it very easy to open another View with all of your relevant dimension intersections already defined.

In this post, we will add a pop-up menu to a View which will open the Audit Log Search view.  The Audit Log Search view provides information from the Dodeca repository on a single data point within your application, such as the old value, new value, who updated it, and when.  There is a sample provided with the Sample application.  This can be used with your application once it is modified to fit your specific environment.

Here is a look at the Sales and Margin Planning view within a sample application I have called OUTLOOK.  This view is used to update the Sales numbers and Margin % across products for a specific market.

Sales and Margin Planning View

Right now, there is no pop-up menu associated with the View.  If I were to right-click anywhere in the view, nothing would happen.

This application also has an Audit Log Search view which was mentioned above.

The Audit Log Search view listed in the View Hierarchy

Here is look at the Audit Log Search View:

The Audit Log Search View

As you can see, for a particular data point in the cube, the view captures old and new values, who made the update, and when.

We will add a pop-up menu to this view which will open the Audit Log search View when we click on any input data cell in the Sales and Margin Planning view.  The Audit view will open for the exact data point that we have highlighted on the Planning view, automatically!  This makes it very easy for any user to get information on any updates made in the application.

Here are the steps we will follow.

1.       Create a PopUp menu item called “Audit Log PopUp”

2.       Create and Configure Button tool called “Open Audit Log”

3.       Assign the Open Audit Log button tool to the Audit Log Popup.

4.       Assign the new PopUp menu to the View.

Most of these actions take place within the Toolbars Configuration metadata editor.  Please note: this metadata editor was also discussed in this post on Adding a Button to a Toolbar.

The source view, “Sales and Margin Planning” has a View toolbar called “Essbase View Standard Limited” .  You can see this in the View Properties under the UI category.  We will edit this toolbar directly, as opposed to creating a new one as we did in the other toolbar post.

The View Properties

An easy way to open the Toolbar Configuration metadata editor for this particular view simply to right click where the Property name, and select Edit “Essbase View Standard Limited”.

Opening the Toolbar Configurations metadata editor

This will bring you to the Toolbar Configurations metadata editor for this specific toolbar configuration.

The Toolbar Configurations metadata editor

Step 1.  Create the popup menu

Click on the Toolbars Designer on the bottom left section of the editor.  This will bring up the Toolbars Designer for this toolbar.  It has five tabs across the top.

The Toolbars Designer with 5 tabs across the top

Go to the Tools tab, then select New… at the bottom left.

Select the Tools tab, then click on New…

This will open the New Tool dialog box.  Select “Popup Menu” from the dropdown, then enter Audit Log Popup for the caption, and AuditLogPopup for the key, then press Add.  I like to take spaces out of the key field just as a preference.  We do not need to select a Category assignment at this time.  This dialog will stay open, so click on close when completed.

Adding a new tool

Step 1 completed.  We now have a new Popup menu item.

Step 2. Create a button called “Open Audit Log”

Click on New… again to open the New Tool dialog.  Select Button from the drop-down, and enter Open Audit Log for the Caption, and OpenAuditLog for the Key.  Press Add.

Adding the second new tool, the Open Audit Log button

Then close the Toolbars Designer.  We now have our button tool, but we need to specify what the button will do.  For this we open the Configure Tools dialog.  To open this, click on the Configure Tools… button in the Toolbars metadata editor.

Click to open the Configure Tools window

The Configure Tools window will list all the tools we have, listed by Key.  Select the new one we created called “OpenAuditLog”.

Select the new tool – OpenAuditLog

The right side of this window is where we will specify what the button does.  In the Tool Controller dropdown, select OpenViewForDataCellToolController.  This will then populate the Tool Arguments window.  Open the ViewID argument by clicking on the ellipsis on the right of the entry field.  This will open the list of Views in the application.

Select from the list of Views in the application

I will select the Audit Log view, which in this case has a view ID of the original view from the Sample application.  That’s all we need to do before committing.  Click on the “Commit Module, Toolbars Configuration, and/or Views” at the bottom of this dialog.  You will get a confirmation message, and also a message that you will need to restart the application.  We will not restart it just yet, as there are a few more updates we can make before restarting.

Step 3.  Assign the Open Audit Log button tool to the Audit Log Popup.

Open the Toolbars Designer window again and go to the Popup Menu Designer tab.  Select our “Audit Log Popup” from the dropdown list of available Popup menus.  Then select our Open Audit Log button tool from the list of tools on the right and drag it over to the left box.  Now the button tool is available in the popup menu.

Adding the button to the Popup menu

Close the window and click on the Commit button in the Toolbars Configuration editor.

Step 4.  Assign the new Popup menu to the View.

This is assigned in the Views metadata editor.  Open this editor for the Sales and Margin Planning view.  There is a property in the UI category named GridContextMenuID.  Click on the dropdown for this property and select our new popup called “AuditLogPopup”.  Then click on Commit.

Final step, add the popup menu to the View

That’s it.  All the updates are completed.  Now we can close and restart the application.

Now let’s test.  Go the Sales and Margin Planning view.  We will make an update and then test the popup.

The Sales and Margin Planning View before update

I will update the Sales number for Birch Beer from 480 to 700.  I will update this to the cube with the Send button on the top of the view.  Once the send is completed, I will right-click on the data cell:

Right click on the data cell to see the Popup menu

I see the Popup.  So far so good.  Now I can click on “Open Audit Log”

The Audit Log opens to the exact data point

Excellent!  Tested and verified.  I see the Audit Log view has opened and I see the update I just made.

Some key points:

  1. Dodeca automatically provides the auditing tracking.  Every update sent to the cube is tracked in the Dodeca SQL repository that comes with Dodeca.
  2. Dodeca KNOWS what cell you are on when you right click, and will automatically use that information when opening another view.  No matter what cell I right-clicked on, Dodeca knows to get the Audit information for that exact data point.
  3. We already had a working view for the Audit Log search.  So we simply needed a button to open that view the button.  I may to another post on setting up the Audit Log View.

Although there were a number of steps involved, I hope you can see that is was a relatively straightforward process to put this together.  Please let me know if you have any questions, and thanks for reading.

 

Adding a Button to a Toolbar in Dodeca

In my last blog post, Copy Forward Comments with Dodeca I showed how you could use the CopyComments method within a Workbook Script (WBS) to bring forward comments from the previous month. In this post, we are going to create a button on the View’s toolbar which will call this WBS procedure. This way, if our user decides to bring forward the comments from the previous month, they can simply click a button and the current month’s comments will be updated.

Adding a button to a toolbar which will initiate a WBS method takes just a few steps:

  1. Create the button tool on the Toolbar Configuration used with the View.
  2. Place the new button on the toolbar.
  3. Assign the button tool with the instructions we would like it to perform

That’s it from a high level. Down in the details there are a number of smaller steps to complete.  For that reason, there are many pictures in this post to capture everything.

Please note that the Toolbar Configuration topic discussed here is also covered in the Dodeca Administrator’s Guide from Applied OLAP, under Section 3: Advanced Topics.

View toolbars can be used across multiple Views. The particular toolbar used in a View is specified in the Views metadata editor, under the View ToolbarsConfigurationID property. See figure below.

The View toolbar is specified in the View properties under UI

In our Actual Budget Analysis View, the toolbar we are using is titled “Essbase View Standard Limited”. Since this toolbar may be used in multiple Views, the very first thing we will do is copy this to another toolbar. That way we can make updates and use the new toolbar without affecting other, existing views.
Let’s go to the Toolbars Configuration metadata editor by right clicking on the ViewToolbarsConfigurationID property name and selecting Edit “Essbase View Standard Limited”:

Right click property name for a shortcut to edit the toolbar

This will bring us to the Toolbars Configuration metadata editor with our toolbar already selected:

The Toolbar metadata editor

We are going to Copy this toolbar to a new one, so click on Copy, and let’s give the new toolbar the name “Essbase View Standard Limited with CopyComments”. Now let’s go back to the Views list, and update our ViewToolbarsConfigurationID to use the new toolbar:

Select the new copied Toolbar to use in the View

We are now ready to add the new tool to this new toolbar. Go back to the Toolbars Configuration editor, ensure our new toolbar is selected, then click on the “Toolbars Designer…” button:

Click on Toolbars Designer… button

This will start the Toolbars Designer for this toolbar In the Toolbars Designer, we have multiple tabs across the top. Click on the Tools tab, and then click New… at the bottom to create a new tool:

Click on the Tools tab, then click New…

In the New Tool dialogue, select Button as the Tool type, and enter “Copy Previous Month Comments” in both the Caption and the Key fields. We can leave the Category field empty right now. Click Add and Close.

Click Add to add the toolbar, then click close.

Our list of tools now includes the one we just created:

Our newly created tool

Before going further, we are going to make a quick update to the properties of this tool. Open the SharedProps hierarchy and scroll down to the DisplayStyle property. Click on the dropdown and select TextOnlyAlways. Setting this will ensure that the button will be displayed with the caption “Copy Previous Month’s Comments” on the toolbar.

Update the DisplayStyle under SharedProps

Next click on the Toolbars Designer tab. Here we can add tools from our list to the toolbar so it shows up when the view is displayed. If you click on the Toolbar drop down box, you will see the 4 categories that exist on this toolbar: Essbase, Grid, Standard and View:

The toolbars listed in the Toolbar Designer tab

These are listed alphabetically, not in the order in which they actually appear in the toolbar. The Grid category is the rightmost category on the toolbar, so that is where we will place our new tool. Select Grid from the dropdown, then select our new tool and drag it to the left, just under the Sheets member of the Grid category. Let’s also add a divider also by right clicking on our new tool and selecting Begin Group:

Add the new tool to the Grid toolbar via drag and drop, then Begin a Group

Click on Close at the bottom of the dialog. In the Toolbars Preview, we should now see our new tool added to the toolbar, with a little divider separating it from the Sheets tool:

The new tool can be seen in the Toolbars Preview

Click Commit to save the toolbar configuration.
Our last step is to now assign the proper actions to our new button. For that, we click on the Configure Tools… button in the metadata editor:

Click on Configure Tools to assign an action to the new button tool

This will bring up the Configure Tools dialog. Click our new tool from the list of tools so we can map it to a Tool Controller. On the right side of the dialog, click on the tool controller drop down, then select WorkbookScriptToolController:

Select the tool, then click on the Tool Controller dropdown

Once selected, the Arguments window will be filled. We only need to enter the WorkbookScriptID and ProcedureName arguments. Select the dropdown for the WorkbookScriptID and select the correct workbook script ID, then select the ProcedureName. The only procedure we have in the script is CopyComments. Once those updates are made, click on the Commit Module, Toolbars Configuration, and/or Views button at the bottom center of the dialog. This will bring up a confirmation message:

Click Yes to confirm. This will bring up the following message box:

You must restart the application in order to use the updated toolbar. Click OK, then restart your Dodeca application. Now we are ready to test. Let’s open our application and run the view:

The View now has the updated toolbar, with the new button to Copy

We see our updated toolbar with the “Copy Previous Month Comments” button. We are in the month of Sep when the view opens. Let’s update the selector to the month of Oct which has not had any comments added yet.

I click on the “Copy Previous Month Comments” button, and voila! Last month’s comments are copied in and I am ready to update and save the comments for the new month.

In the next post, I will add a confirmation message box to the process for the user to confirm the update of the comments for the month. We will also add a notification message box after the update is complete.