There is a procedure GetFileList - returns, as the name implies, a list of files and a couple more options with them.
Is it possible then to use this procedure in the query select?
Something like this: select Field1 from Image where Field2 IN (call GetFileList ());