Monday 8 December 2008

Business Objects - Custom entry to list of values

After recently having joined a new employer, I'll be blogging a bit more about Business Objects and some tricks and tips to get certain stuff done.

Let's start with adding a custom entry to a list of values (lov). In this case, we want to give a user the ability to select in order to select all the values in the lov.

First we of course create the lov itself. In this case, Iøll show a mockup of a lov of clients that pulls data from a table created specifically for the purpose. Imagine that during the ETL process, a SELECT DISTINCT (ClientName) fills the table every night, in order to avoid having to do the SELECT every time an end-user retrieves an updated copy of the universe. It would look something like the following:





With the list of values itself in place, we now create a new object that will contain a dummy string called . In Oracle, we can do this by referencing the SYS.DUAL table. Let's start by creating the value itself:



Add the SYS.DUAL tab le to the universe, and then proceed by clicking on the "Table" button. There, select sys.dual from the list of tables. This will ensure the object will parse properly.

Now open the original list of values again, and select the "properties" tab. Supply a meaningful name for the list of values, and then click the "Edit" button. Here, we will add the newly created object to the existing list of values. Click on the "Combine Queries" button (circled) in order to add the extra object. You will notice a second tab called "Query 2" appearing. Delete the existing variable there, and select the object:



Click "OK" twice to return. At this stage, I usually choose to hide the object, as its only purpose is to enhance the list of values already there. It also is recommended to ensure that on the properties page of the object, you turn off "Associate a list of values".

To finish up, create a filter prompting the user to select a value from the list of values. To this, we will add the option to also select . It would look something like the following (this does assume there is an object "Blog\Client" available, from which the value will be compared with the filter):



This should do the trick. Please be aware that the screenshots contain mockups that have not been validated against a real database, and therefore they might be not neccessarily work 100%. If you find this is the case, please let me know, and I will try to do it over again, and ensure it works against the eFashion universe.

No comments: