2 Replies Latest reply on Oct 8, 2010 6:22 PM by vineet osho

    event.result may not contain an xml element and causes “1010: A terterm is undefined...."

    majester8425 Level 1

      event.result call back from a database may or may not contain an xml element and causes “1010: A term is undefined and has no properties.”

       

      The following xml may be returned from a database call and works fine with the associated if statement

       

      if( event.result.item.ROWSET.ROW != null )

                                   

      <item>

                      <ROWSET>

                                      <ROW>myvalue</row>

                      </ROWSET>

      </item>

       

      But. If the database returns the following (which it can)  and I have no control over the conent, so I can not add a blank element.

       

      <item>

      </item>

       

      I get “1010: A term is undefined and has no properties.” Is there a way to say something like

       

      If (event.result.item.ROWSET.ROW element does not exist in the returned XML then