How do not start a loop?

Guys I certainly having a little issue here, easy to be solved, but I’m not thinking a solution for it.
The experiments works well until it do not identify db_testing1 (it’s a loop!).
Here is the pictures.

You can only write loopName.finished = True if you are within a loop called loopName. Are you calling that code from a routine not within db_testing1?

Hmmm. Good point, the routine here isn’t insert in the db_testing1 (loop)