VMware Cloud Community
TBKing
Enthusiast
Enthusiast
Jump to solution

Specify folder in GetAction

vROrchestrator 7.5 - Working on a "Build From Template" workflow.

We have all of our templates in a folder called "Templates"

In the Presentation, I have an entry/variable to choose the template:

GetAction("com.vmware.library.vc.vm","getFolder").call()

If I select value as "tree" it starts at the top with the vCenter plug-in and I have to drill all the way down to the Templates folder.

If I select value as "list" it will enumerate all of the VMs and I have to start typing a template name to filter.

How can I specify to start with the "Templates" folder either for browsing by Tree (preferred), or by List, thereby limiting the number of choices to choose from?

Thanks

0 Kudos
1 Solution

Accepted Solutions
TBKing
Enthusiast
Enthusiast
Jump to solution

Yes.  It's the "attach" part I was having trouble with.

(with the help of my TAM) I created a variable "#templateFolder", type VC:VmFolder and set to Templates.

Then in the Presentation, Predefined list of elements

GetAction("com.vmware.library.vc.folder","getAllVirtualMachinesByFolder").call(#templateFolder)

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

View solution in original post

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

For browsing a tree, you can use the presentation property "Specify a root object to be shown in the chooser", and attach the "Templates" folder to it.

For the list case, you can the presentation property "Predefined list of elements", and attach to it an action that returns the array of elements to populate in the list.

0 Kudos
TBKing
Enthusiast
Enthusiast
Jump to solution

Yes.  It's the "attach" part I was having trouble with.

(with the help of my TAM) I created a variable "#templateFolder", type VC:VmFolder and set to Templates.

Then in the Presentation, Predefined list of elements

GetAction("com.vmware.library.vc.folder","getAllVirtualMachinesByFolder").call(#templateFolder)

---------------------------------------------------------------------------------------------------------

Was it helpful? Let us know by completing this short survey here.

0 Kudos