How can I loop on database rows and perform actions for each one

I hage a group in which I have informations including dynamic ones from a employee (let’s say) and images from that employee
I have a button to generate the document from the group content by snpashoting it in an image (HTML to PNG) and saving it in the employee table.
Now I want a second button looping on the employees and for each :

  • set a custom state to the current employee (to fill the dynamic datas)
  • snapshot the group as a picture and save it to the database (make changes to a thing)
  • next employee
    after the last one generate a pdf with all theese images saved (one per page)
    how can I do it ??? even with javascript ??? please I’ve been stuck for too long

Use our list shifter plugin, List Shifter NCV Plugin | Bubble