views:

283

answers:

2

Scenario: I have an outline where I have links for my menu. Each link points to file stored on FTP server in DMZ. By clicking each link I run the agent which downloads the file locally and deliver url to it for end user.

I would like to hide outline element when file does not exists. Obviously I do not have this information before I try to access file and I cannot run domino agent to check if I can show this element or not and use it in HideWhen formula window. Also it is not possible to run agent and check all files if exists, store this information in ln db, because simple it's too many files.

Any other ideas?

+2  A: 

If you don't have the information available at the "Outline scope" to determine what links to hide and show, then you'll have to find a way to fail gracefully when a file does not exist. Use some error checking in your agent and if the file does not exist, make sure the user gets a friendly message explaining what happened.

You say that you can't check if all files exists because there are too many, but just how many are we talking about? You may not be able to check them while the database is opening because you'll cause the user to wait too long, but perhaps you could cache the results somewhere. An agent that runs when the database opens could check for the cached list of existing files and use that to figure out which to hide. If the cached file doesn't exist, the agent could run a background agent to update the cache and store it on the server or within the database.

If you have some access to the server, you could also write a program that returns a list of existing files, and use that to feed your Notes database. Lots of options there, but for example you could have a PHP or an ASP.NET page that returns an XML list of files that exist on the server when you call it (or even something simpler than XML). Then again when you open the Notes database, your agent could call that URL, get the results, and go through the list of existing files to determine what links to hide.

Hope this helps!

Ken Pespisa
A: 

inspiration from bookmark.nsf outlines - @IsAppInstalled

I don't get it. @IsAppInstalled can check only Domino apps based on internal name, I cannot used it to check is files exists on FTP acount.
Rafal Ziolkowski