Micro Focus QTP (UFT) Forums
use of a datatable but <enter> is needed after the 8th entry - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: use of a datatable but <enter> is needed after the 8th entry (/Thread-use-of-a-datatable-but-enter-is-needed-after-the-8th-entry)



use of a datatable but <enter> is needed after the 8th entry - cocojava - 10-15-2010

QTP10
XP
IE8

Im wanting to use a datatable (of appox 50 entries) within an action; however an <enter> is needed after every 8th entry.

Can this be done, and if so do you know of where I might find an example?


RE: use of a datatable but <enter> is needed after the 8th entry - supputuri - 10-15-2010

Inlcude this piece of code after setting the row.
Code:
If (Datatable.GetCurrentRow() Mod 8 ) = 0 Then
   '"Now Click on the enter"
End If

The Code looks something like this.
Code:
For RowCount = 1 to DataTable.GetRowCount()
    DataTable.SetCurrentRow RowCount
    If (DataTable.GetCurrentRow Mod 8 ) = 0   Then
        msgbox "Now Click on the enter"
    End If
Next
Let me know if you need any more information