cancel
Showing results for 
Search instead for 
Did you mean: 

SelectQuery: window shows 2 colums local name & Name. Add extra columns??

Occasional Contributor

SelectQuery: window shows 2 colums local name & Name. Add extra columns??

I've written a simple VB Script that selects some attributes and connects them to a class. (I call the VB Script through a MetaCommand an class).

 

In the VB Script I use the function SelectQuery to narrow down the original selection.

All OK until now. The window for SelectQuery shows like it should, I can select the attributes that I want to connect to the class, but It's not always easy to find the correct attributes, I would like to add an extra column to the window. Besides local name and name I would like to add for instance SQL Name as well. Is it possible and can you tell me how I can implement this...

 

Sub CmdInvoke(objMega, intCommandNumber)
			Dim myRoot
			Dim IsolAttr, ColAttrToConnect
			Dim AttrToConnect

			set myRoot = MegaEnv.GetRoot		
			set IsolAttr = myRoot.GetSelection("Select [Attribute] Where not [Class]")
			'msgbox "IsolAttr = " & isolattr.count
			ColAttrToConnect = IsolAttr.selectquery("Select Attributes to connect",false)
			if ColAttrToConnect.count > 0 then
			  for each AttrToConnect in ColAttrToConnect
	        objMega.GetCollection("Attribute").Add(AttrToConnect)
  			next
			end if
end sub

SelectQuery.png