Forum Discussion

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Var1 does not support the "includes" method.  Basically, Var1 is the contents of the Caption property.  It is, usually, a string... but if the Aliased object comes back "Null" and, therefore, the caption itself is "null", than the "includes" method will not be supported.

     

    Your best bet is to first check to make sure the Caption actually renders as a string and then try using the "includes" method.

    • yaseenmd's avatar
      yaseenmd
      Contributor

      Hi Robert,

       

      I have added showmessage() method. it display the Var1 string. 

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Just did a quick google check...  the "includes" method is not supported in JScript.  It's a JavaScript method on the string object, but not a JScript method.  

         

        Instead of includes, change your line to

         

        var res = aqString.Contains(Var1, test);