20 lines
538 B
Plaintext
20 lines
538 B
Plaintext
Function CountRowsForArticle(ArticleNumber)
|
|
Set mywin = CWLStart.CurrentModule.Windows.Item(WINDOW_ID)
|
|
Set Grid = mywin.Controls.Item(GRID_ID).Grid
|
|
Dim Count : Count = 0
|
|
|
|
If DEBUG_ON = True Then
|
|
AddDebugLine "Counting rows for Article: " & ArticleNumber
|
|
ShowDebugBox "CountRowsForArticle"
|
|
End If
|
|
|
|
For Row = 1 To Grid.LineCount
|
|
CurrentArticleNumber = Grid.GetCellValue(Row, COLUMN_ARTICLENUMBER)
|
|
|
|
If ArticleNumber = CurrentArticleNumber Then
|
|
Count = Count + 1
|
|
End If
|
|
Next
|
|
|
|
CountRowsForArticle = Count
|
|
End Function |