Page 1 of 1

retrieving label or comment from a file

Posted: Thu Sep 09, 2010 5:32 am
by bermudabob
I need to be able to set either a label or a comment for a file and then be able to retrieve it again at a later date.

Currently, I can set a label and I can set a comment, but I'm have a job figuring out how to retrieve them. is there any way to get a label or a comment associated with a version of a file? I've looked at the available properties in the VaultClientFile object and also GetFileProperties, but no label info seems there, and the comment field always seems to be blank, no matter what I set it to.

Rob

Re: retrieving label or comment from a file

Posted: Thu Sep 09, 2010 8:47 am
by bermudabob
I've done some more digging, and found how to get the information I need using ProcessCommandHistory. The only stumbling block I've got now is that while I can create a label, I need to be able to create a comment to go with it. Not having much success in finding how to do this...

Re: retrieving label or comment from a file

Posted: Thu Sep 09, 2010 9:23 am
by bermudabob
Looks like I've managed to find out how to do this myself - for information purposes, here's what I did:

I set the 'ServerOperations.client.Comment' field to the comment I wanted and then did the 'ServerOperations.ProcessCommandLabel' method. Lo and behold, the comment field was set. It also works for other operations such as Check in and Check out.

Re: retrieving label or comment from a file

Posted: Thu Sep 09, 2010 1:35 pm
by Beth
Thank you for posting what you found. This should help other users as well.