Forum Discussion

David91's avatar
David91
Frequent Contributor
7 years ago
Solved

Variables Table - Findrow method

Hi,

 

I want search data (string) from my variable table. etc. I search neame David in column Name. Can i get row number from variable table?

 

Thank you

  • Hi,

     

    You can add a counter to your search cycle:

     

    def search_in_table(name):
    table = Project.Variables.yourTableVar
    table.Reset() counter = 1 #consider that first row contains column names while not table.isEOF(): counter += 1 if table.Value["Name"] == name: Log.Message(counter) table.Next()

1 Reply

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    You can add a counter to your search cycle:

     

    def search_in_table(name):
    table = Project.Variables.yourTableVar
    table.Reset() counter = 1 #consider that first row contains column names while not table.isEOF(): counter += 1 if table.Value["Name"] == name: Log.Message(counter) table.Next()