There's a lot you don't tell us about your design.
Why would you have empty rows in your portal?
Why are your searching your portal one row at a time?
If you go to a layout based on the portal's table (so that you are not using a portal), you can enter find mode and perform a search of your portal table's records in that manner.
There are also ways to use a portal filter to omit related records where the fields displayed in the portal are empty.