BusinessObjects Board

Alphabetize in Designer

We have a monthly process that adds new columns to a SQL Server table. We add those columns into the universe via Designer. Then, the user community wants us to alphabetize them.

I’m looking at the Designer Object Model - Classes and Objects. Is there a way to identify the order of the Objects and if so, can that be changed via the SDK. We read the classes and objects into a spreadsheet so that the descriptions can be modified and loaded back into the Universe. If the order number is available and can be modified, I’d love to add it into our VBA.

Thanks!


RonTrimnell (BOB member since 2007-01-31)

There are some techniques that can be used to change the sort order of fields in the table (right-hand pane of Designer) … see discussion here … Sorting of objects in the universe. As far as objects that already exist on the left, there is no help in the SDK, sorry. Manual drag and drop is the only way.


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

If you are talking about organizing objects in classes on the left hand side there in the universe there is a way to sort them.

BOBJ SDK Object there is a Move method that states:

You can use most sorting algorithms for example here is pseudo on a bubble sort (n2):


  For i = 1 to cls.objects.count
  for x = 1 to cls.objects.count -1
    if(strcomp(cls.objects.item(x).name, cls.objects.item(x+1).name, vbtextcompare) = 1) then
       Dim tempObj  as Designer.Object
        Set  tempObj = cls.Objects.Item(x)
        Call cls.Objects.Item(x+1).move(cls.Name,x)
        Call xObj.Move(cls.Name, x+1)
   end if
next
next

This will sort the class that you are currently indexed on and put them in alphabetical order.

If you want to do it for all classes and sub classes put that into a method and recrusively call it.


tathamr (BOB member since 2010-02-23)