When I’m troubleshooting folder issues by running tests with forms via the Metastorm web client, sometimes I quickly need to know the folderID of the folder I’m currently working on in order to query the database for further information about the folder (such as variable values etc). Generally, unless you’ve already done what’s being discussed here, you won’t have the folder ID available to you from the web client, only the folder name shows in your folder list and in order to find out the folder ID, you then use the folder name to query the eFolder table. I want to go from looking at the folder to querying the database as quick as possible.
There are different ways to program your forms to show you the folderID of the current folder via the web client, one such method could be a calculated field showing the %FolderID value, but let’s face it, you don’t want your users seeing this do you? One alternative method would be to have a button, visible only to Metastorm Admins for example (query the eAssignment table for the current users roles) which then queries the database for the current folder name. Again, not bad, but that’s two queries more than we need.
Here’s the code: