Dynamic Query write updates back to database

Ok, I’ve found what I was doing wrong and now have it working…
I needed to declare the following in the Script area

DynamicQueryAdapter yourbaq;
DataTable results;

With that done, I could then use them outside of the private void (this may seem common sense to seasoned users but I’m still cutting my teeth on customizations)

I then was able to add the suggestion from @rosshughes

I got the idea to declare them from this post

Thank you @dhewi for the bones of the DQA