table from @all of calculation field

Comments

4 comments

  • Rainer Grabowski

    Hi Mike, 

    with @all of you get an array, .join() makes this array a string. For your wanted calculation you don't need a string, but the array. 

    var arr = @All of Date of Appointment;
    var arrClean = []
    for (var i = 0; i < arr.length; i++){
    arrClean.push(moment(arr[i]).format("YYMM MMMM YYYY"));
    };
    var arrSort = arrClean.sort();
    var count = 1;
    var results = "";
    for (var i = 0; i < arrClean.length; i++)
    {
    if (arrClean[i] === arrClean[i+1])
    {
    count +=1;
    }
    else
    {
    results += arrClean[i].substr(5) + ": " + count + " cancelations\n";
    count=1;
    }
    };
    results

    Rainer
    grabowski.rainer@gmail.com

    1
    Comment actions Permalink
  • Mike Meyers

    oh man, that's perfect, thanks!  do you have any suggestions (books, websites, etc.) for coding java?

    0
    Comment actions Permalink
  • Rainer Grabowski

    w3schools is great, many,many examples you can find in stackoverflow.com (some times very advanced stuff) - best friend is google search (w3schools- and stockoverflow-links are most time at the top). 

    0
    Comment actions Permalink
  • Mike Meyers

    thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk