BusinessObjects Board

Mass Updating object descriptions in universe

I’ve got a universe designer who needs to update object descriptions in their universe for about 3,000 objects. Does anyone know of a way to automate this if the designer creates a flat file with the object name, id, and description? Could this be done using a strategy?

The designer doesn’t want to have cut and paste 3000 descriptions into the universe. I suppose the unsupported option would be to use a SQL UPDATE statement on the appropriate repository table.

Any ideas?


jsslagle (BOB member since 2002-08-15)

Did you search. Searching on ‘metadata’ finds lots of help.


Cindy Clayton :us: (BOB member since 2002-06-11)

I did a search for ‘Descriptions’ and ‘Objects’ and came up with this topic. It might have just what you’re looking for.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

I have an Excel-based utility for this purpose. It contains two VBA macros that manipulate the Designer object model (no direct repository updates). The first macro “dumps” the current class name, object name, and description in columns A,B,C and repeats the object name and description in columns D,E. Then columns D,E can be edited to a “new” object name and description. The second macro makes the changes to the universe. It’s not “bullet proof” by any means, but I’ll share the code if you’re interested.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Dwayne, I’d love to get a copy of that. Thank you very much for the offer.


MichaelWelter :vatican_city: (BOB member since 2002-08-08)

The Excel utility can be downloaded here. Open the file, press Alt-F8 and you should see two macros. Run GetInfo first. You will be asked to log into Designer, and open a universe. The current class, object, and description will be loaded into the spreadsheet. Make changes to the columns in blue. Then run the MakeChanges macro. You will again be asked to log into Designer and open a universe. There is no “hourglass” so be sure the macro is finished. Designer will be left open with the updated universe UNSAVED, to give you a chance to review the updates.

I will see about getting this added to the Code Samples forum later.

[Edit: Utility has been placed in the Code Samples forum here.]


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Was wondering if there has been any reported issues with this code. It was mentioned that it’s not ‘bullet proof’, so I was wondering if there have been any reported cases of it having/causing problems?


paulmaric (BOB member since 2004-02-09)

I have had no reported problems … either from my own usage (a couple times a month), or from any other users. The “not bullet proof” is mostly in reference to not having any error handling included. If any errors occur, you will see them as they occur. As with most code samples posted here on BOB, they are intended as learning tools … not intended to be “commercial” quality (whatever that means). In any case, it should be worth at least as much as you’re paying for it. 8)


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

I have used it quite a bit and the only problem that I have found is that the macro doesn’t close Designer after it fetches the data from the universe, so there is a hidden Designer session that I have to manually kill. I have also made the following changes to the macro:

  1. I added a message box that says “Done” when it is done. It is not obvious when it is done.
  2. I added a second tab in the Excel spreadsheet for printing out a listing. The tab it generates now is for updating and is not formatted for printing.
  3. I don’t show hidden objects

Dennis W. Disney :us: (BOB member since 2003-09-17)

I’ve actually made a couple of improvements to my own version (closing Designer, cursor management, status messages). I’ll make a note to “clean it up” (maybe even add generic error handling) and repost it here … in all my spare time of course :?


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks for this utility Dwayne,

I’ll check back often for your latest / greatest version! If a subject matter expert happens to delete rows, is there an adverse effect on the mass update? Just wondering how diligent I need to be, as far as checking their changes goes… :?:

-bob


BEvans :us: (BOB member since 2002-08-26)

You’re quite welcome. As far as deleting rows, it should have no impact. The second step is purely update. The utility does not attempt to add or delete objects whatsoever.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Dwayne this utility is great. One question. Can it be amended to pick up new classes and objects that you enter into the spreadsheet. Bear in mind I know very little about the Designer object library, but point me in the right direction and I’ll figure it out. :crazy_face:


Grantie :uk: (BOB member since 2004-07-01)

If I understand your question, you want to have new classes and objects added to a universe by simply adding them to the Excel sheet, correct? Can it be amended? Certainly! Easily? I think not. You would have to expand the utility to cover ALL of the properties of an object, plus include logic to determine if a class / object is new. At that point you’re almost duplicating Designer itself. To make it worth that effort, you’d have to have a HUGE project going. You would probably be better off buying Data Integrator, since it can create universes based on metadata.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

[Removed Duplicate Post -Cp 8/26/2004]

[quote:45a6515ddd="Dennis W. Disney "] I don’t show hidden objects
[/quote]

Hi - I was wondering if you would be willing to share how you modified the spreadsheet so that it doesn’t include the hidden objects. This would be a real nice function to have.

Thanks
Lori


bachman :us: (BOB member since 2002-09-24)

Add the two lines of code as indicated below.

Private Sub GetObjectInfo(Clss, RowNum As Long)
    Dim Cls As Designer.Class
    Dim Obj As Designer.Object
    For Each Cls In Clss
        For Each Obj In Cls.Objects
            If Obj.Show = True Then '<<===add this line
                RowNum = RowNum + 1
                Wksht.Cells(RowNum, 1) = Cls.Name
                Wksht.Cells(RowNum, 2) = Obj.Name
                Wksht.Cells(RowNum, 3) = Obj.Description
            End If                  '<<===add this line
        Next Obj
        If Cls.Classes.Count > 0 Then
            Call GetObjectInfo(Cls.Classes, RowNum)
        End If
    Next Cls
End Sub

Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks so much! :smiley:

Lori


bachman :us: (BOB member since 2002-09-24)

You’re quite welcome.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Hi

I have yet another question about this. The objects that print in the excel spreadsheet are not in the order they are in the universe(this is a linked universe). Is it possible in some way to order the objects that are coming in in the spreadsheet? I have written an oracle query and I know that they need to be ordered by class_id, object_id and Obj_position.

Thanks in advance for your help!

Lori


bachman :us: (BOB member since 2002-09-24)

I don’t think so. There are hidden Class.Id and Object.Id properties that you can use, but I can’t find anything in the object model related to position.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)