Scripting Overview for Business Objects Design Studio
The Design Studio Scripting language is very similar to Java Script. It can be executed both on the Browser as well as the Server.
The scripts follow a “Push” model where in it pushes data to the Components.
This is different to BEx Components and XCelsius where the Components “Pull” data from data sources.
Such kind of script using “Push” model is easy to understand in more complex scenarios.
There are different data types like Integer, String, Boolean.
We also have BI Specific types like Dimension, Member, Filter, ChartType and so on.
All Methods are invoked with dot ” . “
You can enter Control + Space for help after the dot. So all the methods that are available will be displayed and you can select one of them.
Each line of the script should end with a semi colon ;
Let us see an example of a small application where we will try to use some scripting concepts.
I have build a small application as below. I selected a Tab Strip component. And I have placed a Cross tab and a chart in each tabs.
I have two BEx Queries which I have used as a datasources for these.
This is how the application looks like when we execute it locally.
Now lets add a Dimension Filter in the Tab 1. You can see in the image below how easy it is to align all these components in Design Studio.
It shows you the exact distance of any component from the top, bottom, right and left. If you have worked on WAD before you would know how difficult it is
over there to align the components in a page.
Check the properties for the Dimension Filter. Click on Dimension. This will open a window where you can select a dimension to bind it with the filter.
As shown below now the Dimension Filter Component is binded to Distribution Channel.
Now Drag a List Box from the left to your application.
When you check the properties of Application App_Demo you will see an event “Startup”. Click on this event and it will open the script editor.
We need to provide values to the list box which will be displayed when the application runs.
As shown above after the dot when you press Control + Space the help will open and show you list of different methods that are available.
We have selected the method Set Items. As shown above when you select any method the help will also show you the detailed description of what does the method do. We need to get the list of members which we want to populate in the list box.
Now we have selected the getMemberList method and there are four parameters inside the method which we will have to set.
We are going to select the KeyFigures here. Member presentation will be set to External Key and member display will be text and maxmember is 10.
Now open the event On Select of Component LISTBOX_1 and write below mentioned script.
Here we are getting the selected value of listbox and applying it as a filter to DS_1 and DS_2.
Now run the application and you will see a filter on Distribution Channel as below. Click on that to select a value for Distribution Channel.
As shown above you have a List Box available for the three key figures Order Volume, Order Quantity and Open Orders.
When you select any one of these, the chart and the cross tab automatically show values related to it.
So as you have seen above scripting in Design Studio is very easy to use and you have lot of help available.
You have different events which provide you capabilities like select a row of the report and jump to a detailed report, jump to a URL and so on.
You can also set different components as either Visible or invisible by using specific events.