Visokio website     Downloads     Video tutorials     KnowledgeBase  
Scripting: 2 Fields into multi-dimensional array? - Visokio Forums
Scripting: 2 Fields into multi-dimensional array?
  •     Bart October 10, 2012 11:59AM
    Is there a way to get two fields into one array ? I am trying to get unique names as first element of the array and values (Subset_sum([number]),Subset([name],'uniquename')) as the second element. Is it possible? Previously to go around it I was creating field with both fields joined with a comma and then I was splitting it inside JavaScript, so I had a multidimensional array.
  • 2 Comments
  •     steve October 15, 2012 12:05PM
    What do you mean - you want to get something back like this?

    {"John", 5, "Mary", 7, ...}

    Inside Javascript? You will need to get the unique values, then iterate.
  •     Bart October 16, 2012 6:53AM
    Hi Steve,

    Let me give you example :

    Name Number
    John 5
    Mary 7
    John 12
    ...

    I would like to get an array where first element would be John,5 second element Mary,7 third element John,12. Rest of it I can do in JavaScript (sum). Obviously would be nice if I could put into array first element John,17 and second element Mary,7 , but like I mentioned earlier we can do summing in Javascript.

Welcome!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership