by selecting branch from popup lov, query execute and fill records in interactive grid in detail region.

when select branch first time its shows error, after that it will run properly, only first time shows error, second in grid show suppose 4 record but count 8, always show double count

kindly guide properly