Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Need to open a Windows Explorer window list of files

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Need to open a Windows Explorer window list of files
 Login/Join
 
Member
posted
I'm trying to create a clickable entry on a WebFOCUS report that opens a Windows Explorer window that lists all the files in a given folder. I have tried this SYSTEM command:
-SET &RETCODE = SYSTEM(39, '\\lvhwebappdev\pmf\NetworkGoals\NG1.bat', 'D4')

The .bat file has this command in it:
START \\lvhwebappdev\pmf\NetworkGoals\SupportingDocumentation

I get a WebFOCUS window without an error message but nothing happens. Here is the last line of the WebFOCUS info:
D:\ibi\srv77\wfs\edatemp\ts000194>START \\lvhwebappdev\pmf\NetworkGoals\Support-
ingDocumentation

This message has been edited. Last edited by: Larry S,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 3 | Registered: January 11, 2013Report This Post
Virtuoso
posted Hide Post
That command would run on the WebFOCUS server. I don't think that's what you want?

If you're trying to open a Windows Explorer at the client side; I doubt that's possible - for security reasons web browsers tend not to allow such things.

Perhaps you could get this done by providing a link to an FTP directory on your server to your clients?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Member
posted Hide Post
I guess it doesn't matter how it's displayed, but I need to show a list of documents where the user can choose any of the documents to open. I tried creating an HTML script, but that created a button that, when clicked, opened Windows Explorer listing the files in the given folder. I wanted to eliminate the button and go directly from the Focexec to the list of documents.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 3 | Registered: January 11, 2013Report This Post
Master
posted Hide Post
quote:
I guess it doesn't matter how it's displayed, but I need to show a list of documents where the user can choose any of the documents to open.

Here is a model of what we did, when we had a similar requirement..

1. Create a batch job that invokes an FTP command. The FTP command creates a filename listing of the files stored on a share folder. (One set of users maintained this share folder on an ongoing basis.) You would define this folder as an ftp site to your server. (The batch job can run periodically, from your enterprise scheduler.)

Batch Job:
FTP -v -i -s:ftpcmds.txt

ftpcmds.txt:
open localhost
ftpuser
testpw
dir
ls . listing.txt
disconnect
bye 

listing.txt (given that there are two files in the folder):
Document1.doc
Document2.doc  

2. Create the WF page, to allow document selection (or add code to existing page).

listing.mas:
FILE=LISTING, SUFFIX=FIX
 SEGNAME=LISTING, SEGTYPE=S1, $
  FIELD=DOCNAME, ALIAS=DOCNAME, USAGE=A50, ACTUAL=A50,$  

Focexec:
-*
-* File GetDocs.fex
-*
-* Allocate the listing of documents.   
FILEDEF LISTING DISK C:\Data\Batch\FTP\listing.txt
-RUN
-* Create option tags, for each of the documents.  
DEFINE FILE LISTING
 K1/A14 = '<OPTION VALUE=';
 K2/A1  = '>';
 DOC_OPTION/A200 = K1 | DOCNAME || K2 | DOCNAME;
END
-*
TABLE FILE LISTING
PRINT DOC_OPTION
ON TABLE HOLD AS DOCOPTS FORMAT ALPHA
END
-RUN
-*
-* Display Document Selection page to the user.  
-*
-HTMLFORM BEGIN
<html>
<head>
 <title>Document Selection Page</title>
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
 <script>
  function opendoc() {
   selecteddoc = $('#docname').val();
   url = 'ftp://localhost/' + selecteddoc;
   window.open(url, '_blank', "status, resizable");
  }
 </script>
</head>
<body>
 <br>
 Select Document: &|nbsp
 <SELECT id="docname">
  !IBI.FIL.DOCOPTS;
 </select>
 <br><br>
 <input type="button" value="Open Document" onClick="opendoc();">
</body>
</html>
-HTMLFORM END 


Results of run:

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
Member
posted Hide Post
Actually, we have figured this out. It is simpler than I thought. Here is the code we added to the .fex:

TYPE=REPORT,
COLUMN=SUPPORT,
STYLE=BOLD+ITALIC,
URL='\\lvhwebappdev\pmf\NetworkGoals\SupportingDocumentation\&FOLDER.EVAL',

When clicked, this opens up the folder passed in the &FOLDER variable. One rule is that there cannot be any spaces in the URL string.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 3 | Registered: January 11, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Need to open a Windows Explorer window list of files

Copyright © 1996-2020 Information Builders