cancel
Showing results for 
Search instead for 
Did you mean: 

VBScript Exemplars for accessing an Application's > array of Technologies > Status?

SOLVED
Highlighted
Contributor

VBScript Exemplars for accessing an Application's > array of Technologies > Status?

Wondering if someone might have a handy snippet of VBScript code to share that shows the correct syntax for referencing the array of Technologies associated to an Application - and accessing the "Company Standard" and "Current State"  of a Technology?

 

I suspect that the "Technology Compliance" out-of-the-box field may be defined as a virtual field - and the VBScript macro in that - may already provide the type of example I'm looking for -  However, I suspect that that logic may not be considering the "Current State" (e.g. Retired vs. Production).  during my next RDP session to our server, I'll explore that and update this posting.

 

 

 

Some other examples that I've been able to find that might shed some light on similiar types of syntax questions:

https://community.mega.com/t5/Forum-HOPEX-Product/API-GetType-in-VB/m-p/2052 

https://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqR5AAI

MyObject.GetCollection("~msUikEB5iGM3[Component]")

MyCollection.GetSelection("SELECT ~QrUiM9B5iCN0[Org-unit] WHERE ~rtUioAB5iyA1[Component]")

 

https://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqZwAAI

Set oBP=GetCollection("~pj)grmQ9pG90[Business Process]").Item(1)

 

Enterprise Architect, World Traveler, Intrepid Sailor
2 REPLIES
MEGA

Re: VBScript Exemplars for accessing an Application's > array of Technologies > Status?

Hi Kelvin,

 

You can try to run this script in the script editor to print out a list in the format: application name, technology, company standard, current state

 

Dim app, tech

For Each app in GetRoot.GetCollection("~MrUiM9B5iyM0[Application]")
	For Each tech in app.GetCollection("~hpXxA(koITK1[Used Technology\APM]")
		If GetRoot.GetObjectFromID(tech.GetProp("~(YByTkohHrGG[Current State]")).exists Then
			Print app.GetProp("~Z20000000D60[Short Name]") & "," & tech.GetProp("~Z20000000D60[Short Name]") & "," & tech.GetProp("~)4UwO20HID0H[Company Standard]") & "," & GetRoot.GetObjectFromID(tech.GetProp("~(YByTkohHrGG[Current State]")).GetProp("~Z20000000D60[Short Name]")
		Else
      Print app.GetProp("~Z20000000D60[Short Name]") & "," & tech.GetProp("~Z20000000D60[Short Name]") & "," & tech.GetProp("~)4UwO20HID0H[Company Standard]") & ","
		End If
	Next
Next

Cheers,

Gavin

Contributor

Re: VBScript Exemplars for accessing an Application's > array of Technologies > Status?

Thanks @ahbui - I'll explore that sometime over the next few weeks.

Enterprise Architect, World Traveler, Intrepid Sailor