how to join two multidimensional array - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: how to join two multidimensional array (/Thread-how-to-join-two-multidimensional-array) |
how to join two multidimensional array - venkatesh9032 - 02-13-2014 i have 2 multiminesional arrays.. how to join them into one.. RE: how to join two multidimensional array - pranikgarg - 02-14-2014 Get the Count of Second Array. Redim He first Array with the Second Array count and loop through the Second Array and append all the values of Second Array to first Array. let me know if you want code snippet also. RE: how to join two multidimensional array - venkatesh9032 - 02-17-2014 can u provide syntax.. RE: how to join two multidimensional array - anu05446 - 02-18-2014 Redim will erase all the existing elements from the array, and Redim Preserve does not work on 2-D(or multidimensional array). Venkatesh, you can first resize the array keeping the old elements intact and then you can assign the value of the 2nd array to first. I have written the following function which can be used as Redim Preserve on 2-D array. Code: 'function to increase the size of Array "arr" you can make the function robust by using conditions that would check that the new dimension is more than the previous dimension. Tweak the code and apply logic. you should get it !! RE: how to join two multidimensional array - venkatesh9032 - 02-18-2014 Thank you buddy |