Enriching Embedded Dashboards with Custom Controls
This is an introduction to Custom Controls in OneStream Workspaces. In this blog we will walk you through a simple (almost) No-Code example, creating a Custom Control dashboard with an embedded Button component. Custom Control is a new Dashboard Type that enriches what you can do with an Embedded Dashboard in terms of OneStream Dashboard wizardry. It was released in conjunction with Dynamic Dashboards in v8+ (see my previous blog on this concept here) but uses a different approach to solve for a different type of use case. Custom Controls are much more about taking an existing dashboard template (our Custom Control Dashboard) that contains embedded elements and then repurposing it to behave differently by embedding the embedded version of this Custom Control Dashboard into a new Dashboard and using something called Event Listeners to control that component / or components differently, when each independent instance of that embedded Custom Control Dashboard is invoked inside a new Dashboard. This means that Dashboard Templates can be repurposed in different ways, without always recreating the same Dashboards and components for each slightly different use case. Think of this a bit like the old trick to create a custom Embedded Dashboard and pass a parameter value in to it, to render different Dashboard content based on User Selection e.g. But with a much more sophisticated layer of control over the actions performed by your Dashboard Components that reside in your Custom Control Dashboard template. Now let's look at the setup. Setup: Dashboards This example has been created in its own Workspace called WsCustomControl. Let's start by looking at the Custom Control Dashboard. Here we have set the Dashboard Type as Custom Control and selected Layout Type Vertical Stack Panel. Inside this Custom Control Dashboard we have our Button component. When we review the Button itself, we can see that we have to set the Navigation options as below e.g. Selection Changed Navigation Action is Forward Custom Control To Parent Event Listener and the Selection Changed Navigation Arguments must include the EventListenerName Key in the KeyValuePair passed in to the arguments. Hint: If you hover over the Selection Changed Navigation Arguments. You receive some guidance on this (see below). The ButtonEventLister value (it could be called anything) we pass in to EventListenerName KeyValuePair will be explained in the next steps. Let's run the Custom Control Dashboard to see what it looks like, before we dive into the setup. So a simple button, that performs no actions. Since we haven't configured the Button component to perform an action, only to forward a Custom Control Event. Dashboard Button Action 1: Open Dialog Setup So the first example of using an Embedded Custom Control Dashboard, we want our button to perform the action of opening another Dashboard as a Dialog. So let's review that Dialog first before we review the Button itself (in the Custom Control Dashboard) in more detail. In this Dashboard is a Label and a Supplied Parameter (to handle the parameter handshake from Button to Label via Dialog). Let's look at the Label next. Here you can see that we pass in a parameter called |!prm_Label!| Now, let's review the button again. This time observe the Bound Parameter called prm_Button and the Parameter Value for Button Click. Also, please observe that here is where we pass in our Key Value Pair value ButtonEventListener that we saw earlier to the EventListenerName key e.g. EventListenerName=ButtonEventListener. So when do we get to open the Dialog? I hear you ask.... Well we needed some context before we step into the Embedded Dashboard setup. We start with the Dashboard we are launching using our Embedded Custom Control Dashboard template. Here we have added the Embedded version of the Dashboard that we have created. So far, pretty standard right? A Uniform dashboard with an Embedded Dashboard; albeit we don't normally add the Embedded version of a Dashboard to itself... But, let's now have a look at the Embedded Dashboard itself. Dashboard Button Action 1: Open Dialog Logic There are a couple of things to observe here before we get to the Collection. The Embedded Dashboard property is set to pick up our Custom Control Dashboard e.g. CustomControl_Button. Each fresh instance of the Custom Control Dashboard template must have a unique instance name e.g. CustomControl_Button1, CustomControl_Button2, etc. Now let's look at the Event Listeners Collection for this embedded Dashboard. Here we can see this is where we name our Event Listener e.g. ButtonEventListener. We also pass the value from our Button parameter (prm_Button) to our Label parameter (prm_Label) in the Map Bound Parameters property e.g. prm_Label=prm_Button. Remember these from earlier? Finally we set the Button component action to (a) Open Dialog and (b) to open the Dialog we had created earlier with our Label embedded in it e.g. dlg_CustomControl. This means that we are invoking the Button action in the Embedded Dashboard itself by using the Embedded Custom Control Dashboard and changing the action for this instance of the template. This means that when we open our new Dashboard (that uses this Embedded Dashboard), it creates a fresh instance of our Embedded Custom Control Dashboard, where the Button component now opens a Dialog based on our Event Listener logic e.g. Observe, The Label in the Dialog is now displaying the Parameter Value For Button Click value from the Button itself. Next we are going to look at another example of making this Custom Control Dashboard perform a different action. This time it will return a Message to the Dashboard via a Dashboard Extender Business Rule. Dashboard Button Action 2: Return Message to Dashboard Setup So to execute a Dashboard Extender (or Component Service), we first need an Assembly (mine is called Code) to be created in our Workspace (or we can use traditional Business Rules) and then some logic. You'll see how simple this example is below. All we are doing is executing a Dashboard Extender Business Rule to return a Message Box with a custom Message using the XFSelectionChangedTaskResult object e.g. "Event Listener Message Example" Dashboard Button Action 2: Return Message to Dashboard Logic Now we understand how to setup the Embedded Custom Control Dashboard, let's review our second example using the same Custom Control Dashboard template as before. Here we have a new Dashboard, again that is embedded to itself (the same setup as before), but this time we create a different instance of the Embedded Custom Control Dashboard. So let's look at the Embedded Dashboard, again we have set the Embedded Dashboard to look at our Custom Control Dashboard e.g. CustomControl_Button. But we have also given the Embedded Custom Control Dashboard a unique Instance Name e.g. CustomControl_Button2. Now, if we review the Event Listeners Collection in this example, we can see that we are using the same EventListenerName e.g. ButtonEventListener, but this time we have updated the Selection Changed Server Task property to Execute a Dashboard Extender Business Rule and then set the Selection Changed Server Task Arguments to execute our Dashboard Extender Business Rule and Function, which will return a Message Box Dialog to the Dashboard. So let's have a look at this in action. This time when we click the Button from our fresh instance of the same Custom Control Dashboard, it performs the action to return a Message Box that contains the Message from our Dashboard Extender Business Rule instead. So we can make a Component perform a completely different action for each instance by using the same Custom Control Dashboard as a template. Conclusion Now that you have a better understanding of some of these concepts, we can see a lot of new possibilities for reusing Dashboards and Components based on a templated approach and for varying use cases. Once you understand how to harness Custom Controls and combine these techniques with Dynamic Dashboards or even traditional Dashboard techniques, you will have the capability to make more strategic design decisions in your Workspace Development, that simply were not possible before Workspaces and hopefully more creativity and fun on your Dashboard development journey.201Views3likes3CommentsBuilding BiBlend table names, or: a classic tale of XFBR escapology
Tables produced by BiBlend are named with a simple convention, which makes it easy to build dynamic DataAdapters to report on them; however, day-to-day practice is often made awkward by a few gotchas. We can address this task with a very short XFBR function - the perfect tool for a simple fix like this! While working our way through the solution, we'll discuss a few best practices for text-replacement jobs and general rule writing.1.5KViews6likes4CommentsHow to set up Parcel Services - Batch reporting
Do you have many users that you want to send information? And is this information based on data that is available in OneStream, for instance a periodic internal financial statement? Use Parcel Services to automatically distribute books and documents from OneStream. Parcel Services enables you to create packages (groups) that can be shipped to email lists or a file share. This can be done via a dashboard button, or fully automated using PowerShell scripting.13KViews1like29Comments