Hi all,
My application features a browse (DocsBrowse) which shows a list of documents, where the Docs are related to a given Job number.
In this case (see attached), I have 4 documents which relate to Job no. 0000001.
I'd like the user to be able to select from the list, the documents they would like to attach to an email.
So far so good - the docs attached to an given Job no. display just fine, and the user can click in the browse to choose to attach any doc(s).
DocsBrowse.JPG
I now want to scan the browse object to pick up the file names of any docs the user wants to attach, building a comma separated list.
To scan the records, my first thought was to use a table version of fetch_find, which uses a While / Wend loop, and the EOF function - e.g. while .not. eof("Documents") to stop when it's had enough.
... but then I noticed that Alpha provides Object based fetch commands ...
Fetch Commands.JPG
Even better - Starting with the "DocsBrowse.Fetch_First" method, I can construct a loop through the browse, nudging forward a record at a time (using "DocsBrowse.Fetch_Next").
But ... how do I know when the loop has reached / the end of the table (In my instance, on the 4th record) ?
There doesn't seem to be an EOF equivalent for the Object.Fetch ... set of methods.
Help / comments etc. greatly appreciated as always.
My application features a browse (DocsBrowse) which shows a list of documents, where the Docs are related to a given Job number.
In this case (see attached), I have 4 documents which relate to Job no. 0000001.
I'd like the user to be able to select from the list, the documents they would like to attach to an email.
So far so good - the docs attached to an given Job no. display just fine, and the user can click in the browse to choose to attach any doc(s).
DocsBrowse.JPG
I now want to scan the browse object to pick up the file names of any docs the user wants to attach, building a comma separated list.
To scan the records, my first thought was to use a table version of fetch_find, which uses a While / Wend loop, and the EOF function - e.g. while .not. eof("Documents") to stop when it's had enough.
... but then I noticed that Alpha provides Object based fetch commands ...
Fetch Commands.JPG
Even better - Starting with the "DocsBrowse.Fetch_First" method, I can construct a loop through the browse, nudging forward a record at a time (using "DocsBrowse.Fetch_Next").
But ... how do I know when the loop has reached / the end of the table (In my instance, on the 4th record) ?
There doesn't seem to be an EOF equivalent for the Object.Fetch ... set of methods.
Help / comments etc. greatly appreciated as always.
Comment