What you're trying to do is easier than you probably think it is. You will want to use Form.createSublist(), then on the sublist use the .addField() method of the sublist to add columns, then iterate over your search results and do a .setSublistValue() for each column and each line.