Quality Center / ALM Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

MultiValue Field in a VBS File

SOLVED
Go to solution
Highlighted
Zachary Salzban
Super Collector

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 -
Zach
2 REPLIES
Joshua S_1
Honored Contributor
Solution

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
WW239455
Honored 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")
//Add this to "OnDomLoad" event