How can I sort VcHostSystem

Hello

I am new to both Orchestrator and javascript.  I'm trying to create a script to automate the virtual construction in my environment.

I have a little trouble with the sorting.

I can't find how to sort VcHostSystem.datastore.summary.freeSpace

I would like to be able to select the number of logical unit with more free space.  It's really easy to PowerCLI, but I can't get by in Orchestrator.

We know?

Hi Aureus,

Here is a very small example of use in an action or a workflow.

  • Entry: ArrDS [(Array/Datastore)]
  • Output: [Datastore] DS

DS is set in the store of data in ArrDS with more free space. There is no error and management regardless of the type of data store (local / shared).

function sortDS (a, b)
{
 return (a.summary.freeSpace < b.summary.freeSpace);
}
ArrDS.sort(sortDS);
DS = ArrDS[0];

If you look in the browser in vCO API Array-> sort, you will find a very brief explanation of the implementation of the sort.

If you use spell no function, like sort(), members of the group are sorted by primary type. In the case of scalar (number, String,...) it works perfectly. But on complex types as data store that you want to sort on a special criterion and is therefore define an own sorting function.

Hope it will be comfortable.

Kind regards, Andreas

Tags: VMware

Similar Questions

  • How can I sort more by last used date?

    Hello:

    How can I sort the apps on my phone by date of last used?  I know, that there was a way in ITunes but this option isn't there anymore.  It's by name, size, or type I believe.

    I have far too many apps because I let my grandchildren play games.  I'd like to see what games they actually use.

    Thank you!

    Dianne

    To my knowledge, this capability does not exist... at least, I've never seen.

    Barry

  • My e-mail account has a padlock on the envelope, and when I try to get new messages, it won't let me. How can I sort this?

    The account on Thunderbird for my e-mail address won't let me update my box in. When I go to 'New Messages' there is a lock on the envelope and I get all new messages. How can I sort this allow mw to receive my massages?

    The padlock just means it's a narrative that uses a secure connection. It is unlikely to have nothing to do with your inability to pass messages. Who is the account provider?

  • How can I sort my artists by name in itunes

    How can I sort my artists by name in itunes?

    Mark,

    iTunes has absolutely no concept of "last name."  It is simply a lexical sort on the text in the field of the Album.

    If you want to leave the name of the artist he is, but ignore it for sorting, you can enter data in the field artist sorting, which is on the tab of sort for each song.  Use the format "Lastname, Firstname" to get the kind you want.

  • How can I sort pictures

    How can I sort my photos for the oldest to newest.

    What version of Photos do you use?

    With Photos 1.2 and later you can sort the photos in an album or smart album by one of these with the discovered ➙ sort menu:

    According to the times (pictures), pictures are sorted by date with the oldest first or at the top of the window.  With the pictures window, they are sorted by date added to the library with more old photos at the top of the window.

    In pics 1.1 and 1.0 the only available sort order was with the oldest date first.

  • How can I sort a list of Pages?

    How can I sort them into Pages?

    What Pages?

    In the text or in the tables?

    Peter

  • my screen flipped upside down how can I sort it please

    my screen flipped upside down how can I sort it please

    Hello

    Press ctrl + alt + up arrow double Best of Luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • How can I sort the files in descending order & vice versa

    original title: files & folders

    How can I sort the files in descending order & vice versa

    The game, October 7, 2010 20:28:15 + 0000, phil7525 wrote:

    How can I sort the files in descending order & vice versa

    Make sure that you are in the Details view. Click on the heading of the field
    you want to sort. Click on it a second time to reverse growing
    descending, or vice versa.

    Ken Blake (MS-MVP)

  • How can I sort my photos to the Organizer in order of file name?

    How can I sort my photos in 'Order of file name' to the Organizer?

    Do you use items 11?

    This is the only version do not support sort order of file name.

  • How can I sort my address book?

    I use Thunderbird. My address book has always been sorted in ascending order, but it is somehow now in descending order. How can I fix it?

    By clicking on a column header, which will be the primary sort column. Clicking the same header again will reverse the sort order.

    Try clicking on the header titled NAME.

  • How can I sort a coloumn with names of months?

    Hi I m using oracle 11 g how can I adjust the coloumn with month names

    My requiremnt is to sort the coloumn from July to June

    means that the July should be the first and June shoud be the last month of the year

    need help thnx

    You can also...

    kendenny wrote:

    Or this

    SQL > WITH m AS
    2 (SELECT "January" mname FROM dual)
    3 UNION ALL
    4. SELECT "February" mname dual FROM
    5. ANY TRADE UNION
    6. SELECT 'Mars' double mname
    7 UNION ALL
    8. SELECT "in April" mname dual FROM
    9 UNION ALL
    10. SELECT mname "Peut" double
    11 UNION ALL
    SELECT 'June' 12 mname dual FROM
    13 UNION ALL
    14. SELECT "July" mname dual FROM
    15 UNION ALL
    16. SELECT mname "Augustus".
    17 DOUBLE
    18 UNION ALL
    19 SELECT "September" mname
    20 DOUBLE
    21. ANY TRADE UNION
    22. SELECT "October" mname
    23 DOUBLE
    24 UNION ALL
    25 'November' SELECT mname
    26 DOUBLE
    27 UNION ALL
    28 mname SELECT "December".
    29 DOUBLE)
    30 SELECT mname
    31 m FROM
    32 ORDER BY TO_CHAR (ADD_MONTHS (TO_DATE (m.mname, 'Month'),-6), 'MM');

    MNAME
    ---------
    July
    August
    September
    October
    November
    December
    January
    February
    March
    April
    May
    June
    12 selected lines

  • How can I sort a list of smart playlist in iTunes?

    I have smart playlists in iTunes.   Some of them appear with the positions that I can click Sort by name or artist or what I posted.   But the other smart playlists do not have this topic and are sorted in some unknown way.   They often have a colored background.   I don't understand what is the difference between my old and these smart playlist.   But without the title, I can't sort and find the song I am looking for.

    iTunes 12.4.1.6

    iTunes > opinion > view by > songs.

  • How can I sort a column of short phrases in numbers?

    For example, "search for" appears as a first, second and third word in some sentences in column B, but not in all. How can I make the phrases "search for" in a column on a new sheet? I repeat this process for other keywords to make them into categories.

    Hi Ricketer,

    Here are two methods. Both the screening of the string at the top of its column to the string in column B, but are not distinguished between this chain as a word on its own or part of a word string (as in the examples highlighted).

    Formulas:

    C2: = IF (ISERROR (FIND(C$1,$B2,)),"", $B2 ")

    Filled on the right in column C and all lines below.

    E2: = IF (LEN ($B2) > LEN (SUBSTITUTE($B2,E$1,"",)) ", $B2," "")

    Filled on the right in column F and all lines below.

    Kind regards

    Barry

  • How can I sort the rows of data so it would allow me to filter the results?

    I have 2 different VI that work separately to perfect but not so combined.  I use the box USB-6009 to send a digital out to control pneumatic actuators.  Other uses of VI can messages to tell me what buttons are closed.  How can I review my VI to control say "keys 1-3 and it will not move to 4-6 buttons, until it receives the message 1-3 keys were pushed?  This way I can close the test whether buttons stop working or something breaks.    It seems easy enough to do

    Hey chris12345,.

    You should wire the first case, you want to run when executing your shift over to the left of the VI register.  Then inside the case, you must break the wire and create a constant for the next to run business.

    for example,.

    If you want to run '0' when you start, thread a continuous '0' on the far left SHIFT register, then

    within the structure of the housing, place another constant '1' and thread on moving more to the right to register.

    you will see that the case '0' is running then it will try to run case '1 '...

    and so on and so forth.

    who help me?

    Germano-

  • The Report Builder 3 - How can I sort indicators

    I flag indicators - I want to have all the red on top - yellow in the middle and green at the bottom.

    How can I do this

    Contact support for Report Builder.

Maybe you are looking for

  • Web fonts are not displayed

    Hello-For some reason any my Firefox Installer does not display web fonts correctly - it may have done this before the upgrade 13. Is not serious if it's @font-face or Typekit or something else, we'll just to the bottom of the list of relief until it

  • BSOD, random reboots

    Hello We get random reboots.  I replaced the power supply and UPS, as well as running the disk check.  I suspect that there is a driver problem and will be grateful to anyone who helps.  Here is a link to my public folder on onedrive where the minidu

  • Vista does not allow me to install iTunes 9

    When I try to install iTunes 9, I make it through the installer, but get an error on installation by saying "not able to access % APPDATA%\. I contacted the Apple store and they drove me uninstall it and install steps and it still gives me the same e

  • LaserjetP1102w: printers

    I would like to re - install my printer that I got a new laptop (a hp product as well). Being a new user of computers and printers, I.; m unfamiliar terminology more for them... too multidimensional, I lost the instuctions for my printer... I would a

  • nVidia GTX 650 ti only supports DirectX 10, why?

    Hi I'm new here, yesterday, I bought a ti (used) Nvidia GTX 650 graphics card.But this card does not support directx 11. I know that you do not... It's the image... I installed the 331 WHQL driver and also tried the last 336. But none helped me.Pleas