You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I was using it I found that when you go deep to 3 or more nested condition the result query became false (nested condition of nested condition are repeted more than needed).
I think you abandoned this project, that why I emailed you.
I was wondering if you could gave me a clue for how to solve this issue and as soon as I solve it I will share it.
The issue may be in the recursive method to parse the condition and generate the query:
var getCondition = function (rootsel) {
//Get the columns from table (to find a clean way to do it later) //tbody>tr>td
var elem = $(rootsel).children().children().children();
//elem 0 is for operator, elem 1 is for expressions
var q = {};
var expressions = [];
var nestedexpressions = [];
var operator = $(elem[0]).find(':selected').val();
q.operator = operator;
// Get all the expressions in a condition
var expressionelem = $(elem[1]).find('> .querystmts div');
for (var i = 0; i < expressionelem.length; i++) {
expressions[i] = {};
var col = $(expressionelem[i]).find('.col :selected');
var op = $(expressionelem[i]).find('.op :selected');
expressions[i].colval = col.val();
expressions[i].coldisp = col.text();
expressions[i].opval = op.val();
expressions[i].opdisp = op.text();
expressions[i].val = $(expressionelem[i]).find(':text').val();
}
q.expressions = expressions;
// Get all the nested expressions
if ($(elem[1]).find('table').length != 0) {
var len = $(elem[1]).find('table').length;
alert(len);
for (var k = 0; k < len; k++) {
nestedexpressions[k] = getCondition($(elem[1]).find('table')[k]);
}
}
q.nestedexpressions = nestedexpressions;
return q;
};
The text was updated successfully, but these errors were encountered:
While I was using it I found that when you go deep to 3 or more nested condition the result query became false (nested condition of nested condition are repeted more than needed).
I think you abandoned this project, that why I emailed you.
I was wondering if you could gave me a clue for how to solve this issue and as soon as I solve it I will share it.
The issue may be in the recursive method to parse the condition and generate the query:
var getCondition = function (rootsel) {
//Get the columns from table (to find a clean way to do it later) //tbody>tr>td
var elem = $(rootsel).children().children().children();
//elem 0 is for operator, elem 1 is for expressions
};
The text was updated successfully, but these errors were encountered: