BusinessObjects Board

Populating the Description Field in BO Designer

Is there some way to populate the description field for an object in Designer by writing an SQL statement. FOr example if I have all the descriptions in a column called DESC in the DESCRIPTION TABLE in Oracle and want to Populate my the Objects’s description in Designer.

Something like select DESC from DESCRIPTION TABLE into… Bo Description field…

Thanks in advance
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com


Listserv Archives (BOB member since 2002-06-25)

In a message dated 01-06-20 07:30 EDT, you write:

Is there some way to populate the description field for an object in
Designer by writing an SQL statement. FOr example if I have all the descriptions in a column called DESC in the DESCRIPTION TABLE in Oracle and want to Populate my the Objects’s description in Designer.

Something like select DESC from DESCRIPTION TABLE into… Bo Description field…

The answer is (shhhh, tech support may be listening… ) yes, but it is not a supported solution. If you perform any operation other than selecting from the repository, then you have probably voided your support contract. Having said that…

The answer is not as simple as a select into. For one thing, the help text in the universe is broken up into chunks. So if your source data is longer than the size of the “slice” that BusObj uses, then you will truncate values. Because of the processing required, you are better off using a procedural language rather than basic SQL.

Since you mentioned Oracle, I will post the framework of a script that I used at a client site. I have to say this: use at your own risk. You would be best to create a backup copy of your repository and test thoroughly in your environment before making any attempt to do this.

In fact, I would load the help text into a test repository, build a BOMain key for that repository, and import the universe into designer. If the import doesn’t blow up, then check the help text. Check the SQL code too to make sure it didn’t get corrupted. Then and only then consider exporting your new version of the universe to a production repository. Also note that this script does NOT append to any predefined help text, you should delete any help text already defined in your universe to use this script. I had strange results when I tried to append to existing help, so I went that route to get the job done.

As I say, use at your own risk. :slight_smile:

A better way to do this would be to extract the help text from your Oracle tables into a text file, and write a VBA macro to populate the text via the Designer SDK. I am working on this. In my spare time. Ha. :slight_smile:

Regards,
Dave Rathbun
Integra Solutions
www.islink.com

begin

declare cursor c_help_text IS
select help_text,
upper(column_name),
upper(table_name)
from your_help_table_here
where
-- insert where clause as desired
;

v_help_text	varchar2(2000);	-- allow for help up to 2000 char long
v_help_column	varchar2(35);
v_help_table	varchar2(30);

v_help_slice	varchar2(240);	-- BusObj help is 240 chars long

v_slice_num	number := 1;

v_line_ctr	number := 1;

begin

open c_help_text;
loop
fetch c_help_text into v_help_text, v_help_column, v_help_table; exit when c_help_text%notfound;

v_line_ctr := v_line_ctr + 1;

v_slice_num := 1;

while length(rtrim(v_help_text))>0 loop

-- insert the first 240 characters
v_help_slice := substr(v_help_text,1,240); 

-- and get the rest of the string
v_help_text := substr(v_help_text,241);

insert into bo_unv_object_data values
(v_help_table||'.'||v_help_column, 'H', v_slice_num, v_help_slice); 

v_slice_num := v_slice_num + 1;

end loop;

end loop;

commit;

end;
end;
/

Listserv Archives (BOB member since 2002-06-25)

Dave, I had been researching this same question. Are you updating the unv_object_data.obj_datatype = ‘h’ row with the descriptions? If so, when objects are used in multiple universes and don’t you have to insert a description/help row each time the object is used ? And how did you determine which objects get what description? by parsing thru the select clause? Your insert statement doesn’t match up with my table.

Michele
michele.pinti@stdreg.com


Listserv Archives (BOB member since 2002-06-25)

In a message dated Thu, 21 Jun 2001 11:21:10 AM Eastern Daylight Time, “Pinti, Michele A” Michele.Pinti@STANDARDREGISTER.COM writes:

<< Dave, I had been researching this same question. Are you updating the unv_object_data.obj_datatype = ‘h’ row with the descriptions? If so, when objects are used in multiple universes and don’t you have to insert a description/help row each time the object is used ? And how did you determine which objects get what description? by parsing thru the select clause? Your insert statement doesn’t match up with my table.

My insert was going into a temporary table. That way I could verify the data.

I was not updating the ‘H’ rows, it was only going to be an insert.

The insert statement was hardcoded to a particular universe. In my case, this was not an on-going process but a one-time event. So there was no need to make it repeatable. We deleted all of the help text from the repository prior to running the insert.

We matched objects based on the select clause. If you look at the code I posted, my temp table had a column with TABLE.COLUMN in it. That was matched against the object select statement… anywhere there was a match, the help text was loaded. Obviously this does not catch anything with a sum() or other database function wrapped around it.

The purpose of the code that I posted was to obtain up to 2000 possible characters of help text and parse that data into a format suitable for inserting into the repository. Once I got the data built, there was a simple delete (to clear out any existing help text) followed by an insert with a hard coded universe id.

I still think that the best method to do this would be with the Designer SDK. That avoids any need to “touch” the repository at all.

Regards,
Dave Rathbun
Integra Solutions
www.islink.com


Listserv Archives (BOB member since 2002-06-25)

Using BO Designer SDK is the wise idea. Prior to BO5.x designer SDK was not available. Hence we had to tweak the repository db.

Vasan

In a message dated Thu, 21 Jun 2001 11:21:10 AM Eastern Daylight Time, “Pinti, Michele A” Michele.Pinti@STANDARDREGISTER.COM writes:

<< Dave, I had been researching this same question. Are you updating the unv_object_data.obj_datatype = ‘h’ row with the descriptions? If so, when objects are used in multiple universes and don’t you have to insert a description/help row each time the object is used ? And how did you determine which objects get what description? by parsing thru the select clause? Your insert statement doesn’t match up with my table.

My insert was going into a temporary table. That way I could verify the data.

I was not updating the ‘H’ rows, it was only going to be an insert.

The insert statement was hardcoded to a particular universe. In my case, this was not an on-going process but a one-time event. So there was no need to make it repeatable. We deleted all of the help text from the repository prior to running the insert.

We matched objects based on the select clause. If you look at the code I posted, my temp table had a column with TABLE.COLUMN in it. That was matched against the object select statement… anywhere there was a match, the help text was loaded. Obviously this does not catch anything with a sum() or other database function wrapped around it.

The purpose of the code that I posted was to obtain up to 2000 possible characters of help text and parse that data into a format suitable for inserting into the repository. Once I got the data built, there was a simple delete (to clear out any existing help text) followed by an insert with a hard coded universe id.

I still think that the best method to do this would be with the Designer SDK. That avoids any need to “touch” the repository at all.


Listserv Archives (BOB member since 2002-06-25)