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