Forum Discussion

David91's avatar
David91
Frequent Contributor
5 years ago
Solved

Variable table findrow method

Please i need help with create variable table method findrow.. i found in TC community code:   def search_in_table(name): table = Project.Variables.yourTableVar table.Reset() counter...
  • Reshail's avatar
    5 years ago

    Okay so I dont know what table.reset does I've never really used it. What I would do in your case is ( If you have your column number fixed which is not a great idea btw)

     

    function FindDavid(){
    table = Project.Variables.yourTableVar

    for(var i=0; i<table.RowCount; i++){

    var cell = table.cell(i,0) //whatever your column number is

    if(cell.contentText == "David"){
    return i;
    }

    }
    }

     

    Try this and let me know.