Quality Center / ALM Practitioners Forum

MultiValue Field in a VBS File

Go to solution
Zachary Salzban
Trusted Contributor.

MultiValue Field in a VBS File

Hello -

I have a custom field that I am trying to set in a VBS file. I can not declare the variable for the field as a certain type with:

Dim x As IBaseField2

in order to be able to get the MultiValue object.

How can I do this?

Thanks -
Joshua S_1
Outstanding Contributor.

Re: MultiValue Field in a VBS File

In vbs, you cannot use the As keyword that you would use in VB. Just get the IBaseField2 object, however you normally would, and assign it to x. x will then act as an IBaseField2 object, and allow you to use any of that object type's methods. You don't actually even have to Dim x, though you can, if you would like to keep track of your variables better.

Dim x 'As IBaseField2
Dim y 'As MultiValue

Set x = theIBaseField2Object
Set y = x.FieldMultiValue
Acclaimed Contributor.

Re: MultiValue Field in a VBS File

No Typing in VBS, just use the object proporty (if it lets you - in this case it does) eg:
Set MyBug = TDConnection.BugFactory.Item("1")
Set MyMlt = MyBug.FieldMultiValue("BG_USER_01")