Hi,
The problem is If block is out of the foreach row loop
The output value of ‘result’ contains only last row value once it comes out from the loop.
So Solution is place the if condition inside the Foreach row loop and test it once.
If you want to come out from the loop if your search keyword id found, you can give the break activity in if loop