VMware Cloud Community
sakruaba
Contributor
Contributor
Jump to solution

Filter result : getAllVirtualMachinesByFolderIncludingSubFolders

Hi,

i would like to filter a result on a GetAction => Only the value of Name TPL_W212COM-Q ( see attachement )

Best regards

2018-12-07 10_34_44-VMware vRealize Orchestrator - _7010537 @ bbs-vpxvro-q001 - [S- __Distant.png

2018-12-07 10_36_13-Start Workflow _ Copy of APHP - Deploy of a Virtual Machines- __Distant.png

Reply
0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

The scripting action getAllVirtualMachinesByFolderIncludingSubFolders returns array of objects of type VC:VirtualMAchine, not array of strings.

So the proper fix is to change the type of your workflow's input parameter Template_List from string to VC:VirtualMachine, and then in the scripting code of your workflow you need to make the appropriate changes in places where you access this parameter value.

View solution in original post

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

The scripting action getAllVirtualMachinesByFolderIncludingSubFolders returns array of objects of type VC:VirtualMAchine, not array of strings.

So the proper fix is to change the type of your workflow's input parameter Template_List from string to VC:VirtualMachine, and then in the scripting code of your workflow you need to make the appropriate changes in places where you access this parameter value.

Reply
0 Kudos
sakruaba
Contributor
Contributor
Jump to solution

thanks you i know what you mean.

best regards

Reply
0 Kudos