// A sample using some query to get data obtained in result and manipulate accordingly
XPathMetaInfo metainfo = new XPathMetaInfo();
queryText = "SELECT ig_id, ig_branch, ig_year,max(ig_index) as ig_index,ig_bu FROM wp_tra_om_indentid_gen WHERE ig_branch=:branch and ig_year=:yr and ig_bu=:bunit GROUP BY ig_branch,ig_year,ig_bu";
QueryObject queryObject1 = new QueryObject(queryText);
queryObject1.addParameter("branch", "wp_tra_om_indentid_gen.ig_branch", QueryObject.PARAM_STRING, branch);
queryObject1.addParameter("yr", "wp_tra_om_indentid_gen.ig_year", QueryObject.PARAM_INT, yr);
queryObject1.addParameter("bunit", "wp_tra_indent_details.id_po_no", QueryObject.PARAM_STRING, bunit);
int IndentData = queryObject1.execute().getDatasetNode();
int[] tupIndID = XPath.getMatchingNodes(".//ig_index", metainfo,IndentData);
Index = Node.getData(tupIndID[0]);
Indx = Integer.parseInt(Index);