display array of array in table control


I had a requirement to display the follwoing data in a table, do like to seek advice how to display it in a table.

I had try putting $temp1,1 at the input of the table control but got error for it

vars.$temp1 = new array();

vars.$temp2 = ["abc","efg","hij"];
vars.$temp3 = ["hah","lol","ttt"];


trying to get some thing like below

| abc | efg | hij |

| hah | lol  | ttt |


  • Two points:

    1: Your arrays are not going to display horizontally in a table - they will display vertically, like so:

    | aaa | bbb |
    | aab | bbc |
    | aac | bbd |
    | aad | bbe |

    If you absolutely need them to display horizontally, you'll need to do extra manipulation when you calculate them, so that their values get distributed in such a way that they display the way you want.

    2: Since it looks like you have a place/time in your logic flow to do this calculation, why not simply make two separate arrays? Populate $array1 with what you want in the left column and $array2 with what you want in the right column, and then put those variables in the input of the column itself, not the table.

  • Hi AChandler,

    Thanks for the response, actually I had about 6 column of data to be display. 

    I'm actually using this in a wizard, which function is to create multiple new request ticket, and the table which I'm trying to show here is actually a summary page after the wizard create the ticket. with information like:  open time, ticket id, catgory, requestor name, success/fail,logical name.

    what happen in the wizards action script, is that after the script run to create the ticekt, I will push the infromation into an array.

    So base on your advice does it mean I should create 6 array and when pushing data, I need to ensure that each push is push to the right index? 

    open time | ticket id | category | requestor | successs/fail  | device
    01/01/01   | RF123     | software | falcon       | successful      | network



  • Yes, I would say you should create six arrays and populate them accordingly so that the correct field values will show on a table row for each ticket properly.

    Alternatively, couldn't you have the wizard, after creating these new tickets, send the user to an actual record list of them? That is, don't go to the trouble of populating and displaying these arrays - simply have the wizard end by displaying the tickets themselves.