Syntax for Repository Name

I’m stumped on the syntax for inserting the Repository name in the following statement:

Myvar = Application.Universes(“UniverseName”).Classes(“ClassName”).Objects(“ObjectName”).ListOfValues.Values

My environment has multiple Universes that have the same name but they are in different repositories. Where does the repository name go?

Thanks


denderoo (BOB member since 2004-06-23)

I think in order to reference something like a list of values you have to have opened the universe first. By specifying a specific directory path you can say which universe that you need.

There is some sample code at the Integra web site that you may find useful. It’s a bit older, so I don’t know how up to date it is. But if you’re just getting started I bet it would provide some nice tips for you.

Working With the Designer Object Model

That article was not written by an Integra consultant but by a former listserv member.


Dave Rathbun :us: (BOB member since 2002-06-06)

Thanks for the suggestion. The site you referred me to does have a lot of great examples. I am a beginner but I’m not really working with Designer. I was trying to follow an example that was posted in this forum on how to fill in a combo box with a list of values for a particular dimension and then display that info in a form on a report.

I think the environment I’m in may pose some particular challenges so I probably can’t use the sample code that was provided. The message I receive back when the code is executed is to “specify a repository” or something like that. Actually, when I just add in the Repository name following the Universe name, i.e., Myvar = Application.Universes(“UniverseName”,“RepositoryName”)…
the statement gets a little further but then breaks down on the “Class” parameter. I can’t tell if the problem really is with Class or if the problem is with how I specified the repository name.

I think I’ll let this go for the time being. Thanks again for the reply.


denderoo (BOB member since 2004-06-23)

I also was struggling with this same issue, and tried the same thing you did. You had it correct, except you need to take the quotes off your repository name (which references it as an object instead of a string or name.)

I am brand spanking new to Business Objects and VBA but thought I’d share this info since I figured it out on my own :wink:

Assuming your repository is called BOMain, you would code it like this:

Myvar = Application.Universes(“UniverseName”, BOMain).Classes(“ClassName”).Objects(“ObjectName”).ListOfValues.Values


soluki (BOB member since 2004-06-11)

Thanks a lot for passing that info along! I had given up on it but now will give it another try. :slight_smile:


denderoo (BOB member since 2004-06-23)