C#: List Available Labels for a Project

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
ejhansen71
Posts: 60
Joined: Thu Nov 13, 2014 10:12 am
Location: Lake in the Hills, IL

C#: List Available Labels for a Project

Post by ejhansen71 » Mon Dec 08, 2014 9:53 am

Reading through the posts - this was last addressed back in 2011. I am creating a form and will access Vault Standard 6.1 to get a list of all labels available for a selected project. So under $ there may be 1 or more projects. The user will select the project and a list of labels will appear. They will select the label they want to promote to production and submit.

I do not see a method in your API that would allow this. Is there a workaround or an example piece of code that would work for this application?
Thanks!

Eric

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: C#: List Available Labels for a Project

Post by Beth » Mon Dec 08, 2014 11:08 am

What you will want to use are the functions clientinstance.beginlabelquery, clientinstance.endlabelquery, and clientinstance.getlabelqueryitems_main.

If you have any questions about those just let me know.
Beth Kieler
SourceGear Technical Support

ejhansen71
Posts: 60
Joined: Thu Nov 13, 2014 10:12 am
Location: Lake in the Hills, IL

Re: C#: List Available Labels for a Project

Post by ejhansen71 » Mon Dec 08, 2014 11:31 am

Thanks Beth, I will implement that. I have been thrown into C# and .Net programming so this is all very interesting.
Thanks!

Eric

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: C#: List Available Labels for a Project

Post by Beth » Wed Dec 10, 2014 9:28 am

Just an FYI..

In Vault 8 you will have a few additional options for working with labels. We have added the command FindLabels to our Vault command-line client and the function ServerOperation.ProcessCommandFindLabels() to the Vault 8 API.
Beth Kieler
SourceGear Technical Support

Post Reply