Suppose you have a document with the Products tabular part (screenshots 1 and 2). Then you are doing a search in this tabular part (screenshot 3).
The following code outputs the lines that were included in the search results (screenshot 4).
Code
&AtClient
Procedure Command1(Command)
For counter = 0 To Object.Products.Count() - 1 Do
If Items.Products.CheckRow(counter) Then
Message(counter + 1);
EndIf;
EndDo;
EndProcedure