Focal Point
Checking for file existence -- row by row?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3731049422

April 24, 2007, 12:25 PM
Trav
Checking for file existence -- row by row?
Anyone have thoughts on how to check for file existence on a row by row basis?

I have a report that I would like to control a column value on based on whether or not a file exists for that row. In other words, I could create a define/compute to determine what the filename is -- but can I change the value of another column based on whether or not that file exists?

Thanks!



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
April 24, 2007, 12:39 PM
TexasStingray
Sounds like you need to create your own user written subroutine.

-




Scott

Trav,
I don't think you can check for the existence of a file on disk from within a TABLE Request.
On Windows/UNIX I would first create the list of filenames I am looking for and hold it in a alpha format file.
Then -READ each value and use Dialogue Manager to check to see if the file exists (using STATE). Write the result to another flat file.
Then I would use MATCH or JOIN logic to pass this information into my final report.


WebFOCUS 760 HPUX - Using MRE, Report Caster, Dashboard and Self Service.
Trav, I have created user written subtoutings (a dll on windows) in the past and this sounds like a good one. What platform is your reporting server running on?




Scott

Server & Client are running on Windows 2003. Sounds like I would need to do this in C or something and then compile a .dll then, right?



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF
Travis, I am glad to hear that the DLL and code I sent you worked great. I am planning on making it available on my website shortly for others to download. Please post any comments you have about it here so others can see what you think of it. Also if you could explain how and why you are using it, it may give ideas to others.

Thanks Again
Scott




Scott

It did in fact work great. I've not put it to use yet, but based on my tests, it seems like it will work exactly the way I'd hoped.

Basically the user request is to be able to create a document on a shared drive on our network. The existence of that document represents a unit of work that has been completed. In this particular case, the user wants to be able to see if that work has been completed and how it relates to other data in the system. So in essence, the existence of that file will drive a status column on the report!

Thanks again for your help on this Scott!



Production: 7.6.6 WF Server  <=>  7.6.6 WF Client  <=>  7.6.6 Dev Studio
Testing: <none>
Using MRE & BID.  Connected to MS SQL Server 2005
Output Types: HTML, Excel, PDF