Hi BobRay,
I can understand you being lost. I didn't want to go into a huge amount of detail and bore everyone.
I found an answer even if it is a bit of a kludge. I could see the ID I was looking for as part of a file name that was generated by something else.
So I created a snippet that extracted just the ID from the filename. It will break if the path ever changes but that is unlikely.
I had used up the time budget so just had to make it work. I made some notes of how it works for future reference.
Now the boss thinks I'm a legend
Thanks for your help. Sometimes just bouncing questions off someone else is a big help.
Trying to answer your questions above made me think of the answer. And it wasn't database queries
David.