Skip to main content

Selection filtering returning odd results

Comments

2 comments

  • Prajakta

    I am not sure I completely understand your problem, but looking at the rule I see at least one issue there.

    If I am not wrong, then in the http.get statement you need to use 'catGroupTest.value' not just catGroupTest.

    Can you try correcting it and then see if the rule works?

    0
  • Forum User

    You are right. I did forget the ".value" on the end. I also forgot that my "CatGroup" value was inside of a repeating element and therefore needed my loop variable.  Below is my revised code.

    var j, opts, i, index = DailyRows.itemIndex;
    
    for (j = 0; j <= index; j++) {
        if (CatGroup[j].value.length > 0) {
            eval("x=" + http.get("http://localhost:8082/database/MFC/TimeDescription/category?CatGroup=" + CatGroup[j].value));
            opts = [ "" ];
            for (i = 0; i < x.resultSet.length; i++) {
                if (x.resultSet[i]) {
                    opts[i] = x.resultSet[i].TimeCode + "=" + x.resultSet[i].TimeCode + "--" + x.resultSet[i].Description;
                }
            }
            TimeCode[j].options = opts;
        }
    }

    Thanks again for your help!!

    0

Please sign in to leave a comment.