Forum Discussion
tristaanogre
Esteemed Contributor
Your best bet is to build a routine that will use a PageDown or scroll down command in the table where you will search the table for desired values, if not found, scroll down... rinse and repeat.
Without knowing the specifics of your table, exact code is not possible but I'm thinking it would be something on the lines of either a for loop or a while loop.
funmay
6 years agoContributor
Thank you for your reply. A sample code would have been better.
- tristaanogre6 years agoEsteemed Contributor
Sample code..... this is PURELY pseudo code, untested, simply to give the basic idea. This is where I would start but, as indicated above, specifics will have to be up to you to implement based upon the object, methods available, etc.
function findItemInTable(tableObject, stringToFind, columnToSearch){ var itemFound = false; while (!itemFound){ //might need an additional check here to determine when you've reached the bottom of the table, possibly based upon some sort of record number displayed or gathered from somewhere else for(var i=0;i < tableObject.RowCount; i++){ if(tableObject.Cell(i, columnToSearch).contentText === stringToFind){ itemFound = true; break; } tableObject.scrollDown; //Don't know what command to use here. Could be a Keys to use Page Down, may be a native function to page down, might be interacting with a scroll bar. You want to make sure whatever is implemented will go down a full page } } }
Related Content
- 8 months agoLuukdb
- 2 years agoloricotton
- 2 years agorkadali
- 2 years agodhundley
Recent Discussions
- 22 hours agojstaehlin