C#: List Available Labels for a Project

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

Moderator: SourceGear


Posts: 58
Joined: Thu Nov 13, 2014 10:12 am
Location: Lake in the Hills, IL
PostPosted: 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

Posts: 8418
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: 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

Posts: 58
Joined: Thu Nov 13, 2014 10:12 am
Location: Lake in the Hills, IL
PostPosted: 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

Posts: 8418
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
PostPosted: 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

Return to Questions (API)

Who is online

Users browsing this forum: No registered users and 1 guest

cron