Forum Discussion
So... your column includes the timestamp?
What you're going to have to do is, instead of using the native FindRow, write your own for-loop to go through the rows on your grid and use an aqString.Find method on the current row to determine if the column contains the date.
- msap7 years agoFrequent Contributor
getting an error : aqString object not found
for(i=0;i<= Grid.wRowCount-1;i++)
var i=Grid.aqString.Find("Created Date","FormatStr")
Log.Message("Value of dt string --> " + "Created Date")Grid.wValue(i, "Created Date");
Log.Message("Value of dt string --> " + "Created Date")- tristaanogre7 years agoEsteemed Contributor
aqString is not a child object of grid.
https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqstring/find.html
- tristaanogre7 years agoEsteemed Contributor
Generally,in pseudoe code:
for all rows in the grid { var dateString = attributeMaintenanceGrid.wValue(rowIndex, 'Created Date'); if (aqString.Find(dateString, FormatStr, 0, false) != -1) { var foundRow = rowIndex; break; } }
Basically, you're doing the loop through the grid, finding the row yourself. Find does a "contains"... so, it will return a value >= 0 if it contains your date, otherwise it will continue the loop. It exits the loop and the row you want is stored in the "foundRow" variable.
Note, the above code is NOT tested, NOT runnable, NOT accurate code... it's presented only to give example of how to do it. It's up to the reader to make the proper edits and application for production use.
Related Content
- 9 years ago
- 4 years ago
- 5 years ago