@BendegzHegedus as it happens we just had an example where an information from one loop has to be stored to be used in the new one via storing it in a temporary table. You might be able to adapt that:
Otherwise maybe you could provide use with sample data without spelling any secrets