Forum Discussion
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.
how do you define rowIndex here?
Is it find row method, if I use Find row : value 6/14/2018 was not found in the created date column is seen
- tristaanogre7 years agoEsteemed Contributor
How did you implement it? What's your code? As I mentioned in my post, what I posted was JUST to give the concept. I can't debug your code if I don't know what you wrote.
- msap7 years agoFrequent Contributor
Thanksalot Martin! I changed the rowIndex to the value i which I used in for Loop.
It retrives only one record instead I have two records with same date, any other changes to it .
for(i=0;i<=Grid.wRowCount-1;i++)
{
var dateString = Grid.wValue(i, "Created Date");
if (aqString.Find(dateString, FormatStr, 0, false) != -1) {
Log.Message(FormatStr + "FormatStr" + "' was found in string '" + "dateString")
//var foundRow = i;
break;
}
else Log.Message(" no date found")
}
}- tristaanogre7 years agoEsteemed Contributor
If you want it to find and log all dates, simply remove the "break" line.
- Marsha_R7 years agoModerator
msap wrote:
how do you define rowIndex here?
Is it find row method, if I use Find row : value 6/14/2018 was not found in the created date column is seen
Notice that tristaanogre's example says "for all the rows in the grid". You are looping through the grid and checking each one to see if the date matches today. There is no magic shortcut for finding a certain date value (or any other value). You look at a row and either it matches or it doesn't.
Related Content
- 9 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 2 days ago