|
|
Re: creating new table rows in script [message #1110945 is a reply to message #1110660] |
Tue, 17 September 2013 14:38 |
Gibran Shah Messages: 33 Registered: September 2013 |
Member |
|
|
Michael Williams wrote on Tue, 17 September 2013 02:41Can you explain more about what exactly you're trying to do, so I can try to provide the best solution for your scenario?
Sure,
I'm trying to populate a table with data from a 3D array that I created in script. So it's not a dataset. So I can't bind the table to it in the usual way. This means that I have to create the table dynamically. i.e. I have to iterate through the array and create rows for each step in the iteration. Ultimately, I want to do this for several different tables (each one being a different kind of table so I can't just repeat the same table). Each table will consist of data from a different index in the 2nd dimension of the array. That is to say, if you think of the array as [person's ID][tax form][field data], then each table represent a tax form (i.e. a T4 slip or a T3, etc.). So the script for, say, the T4 table will look into [person's ID]["T4"] and iterate through the field data at that index filling in the table with that data. The script for, say, the T3 table will look into [person's ID]["T3"] and so on.
The original dataset from which I created this 3D array was just too disorganized and contained superfluous data, so I couldn't use it (at least, I couldn't figure out a simple way to bind it to the many tables I need). So I created a more organized and ordered array in script. Of course, how to bind the data in the array to the tables now becomes the tricky part, but I figured there must be a way to do it even if I have to create each row dynamically through script.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03280 seconds