Forum Discussion

msap's avatar
msap
Frequent Contributor
6 years ago

finding row for two cloumns

I implemented rowindex=grid.find row("type", "value"); which works good, i need to make some changes to it  where i want my script to find two column values in a row instead of one.

any ideas..

type= value and type 1=value1 two columns  in a row.

3 Replies

  • karkadil's avatar
    karkadil
    Valued Contributor

    change the type of your 2 parameters from STRING to ARRAY (as it is implemented in standard Find methods).

     

    You can also modify your existing function so that you don't have to change strings to arrays everywhere where you call this function, like this:

     

    if(typeof(param1) == "string"){

      param1 = [param1];

      // here goes your new implementation which uses arrays instead of strings

      // it will also work with old string types

    }

    • msap's avatar
      msap
      Frequent Contributor

      could you explain more clearly, how can I code using array for finding row.

    • msap's avatar
      msap
      Frequent Contributor

      I tried but not worked. please could you explain more clearly, how can I code using array for finding row using two columns methods.