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     [CLOSED] Hold file to populate dropdown list

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Hold file to populate dropdown list
 Login/Join
 
Member
posted
Hi, I am new to WF and am not able to figure out why this code will not work. We want to use a hold file to get the values to use in a drop down list in the next report. I can get things to work if I run the hold file report by hand first, but not when I try to run the last part. I have written what we want to do using the movie file. The code is:

APP HOLD TEMP
DEFINE FILE MOVIES
DESC/A200=MOVIES.MOVINFO.MOVIECODE || (' - ' | MOVIES.MOVINFO.TITLE );
END
TABLE FILE MOVIES
PRINT
'MOVIES.MOVINFO.MOVIECODE'
'MOVIES.MOVINFO.DESC'
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS MOVIE_LIST FORMAT FOCUS
END
-RUN

APP PREPENDPATH TEMP
TABLE FILE MOVIES
PRINT
'MOVIES.MOVINFO.MOVIECODE'
'MOVIES.MOVINFO.TITLE'
'MOVIES.MOVINFO.CATEGORY'
WHERE MOVIES.MOVINFO.MOVIECODE EQ '&MOVIECODE.(FIND MOVIE_LIST.SEG01.MOVIECODE,MOVIE_LIST.SEG01.DESC IN movie_list).MOVIECODE.';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
END


Thanks for your help

Steve

WF 7.6.9
Solaris 10

Thanks

This message has been edited. Last edited by: Kerry,


WebFocus 7.6.9
Solaris
All output
 
Posts: 5 | Registered: September 21, 2009Report This Post
Virtuoso
posted Hide Post
First your hold file name is too long...8 characters or less.
Change that and then use this Where statment

WHERE MOVIECODE EQ (&MOVIECODE.(FIND MOVIECODE IN MLIST).MOVIECODE.);


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
The hold file name is not too long, nowadays you can use longer names, even for focus files.
There are two other issues here:

The first issue is that you're using autoprompting. For that to work succesfully, the hold file has to be in place BEFORE autoprompting is performed. And Autoprompting is done before the fex is executed. So if the master file movie_list is not present in the TEMP dir, you'll get an error message that it can't find the master file.

Second issue I found is that you'll have to specify where the master is located. Again this has to do with the autoprompting. This parser can only follow the server path, not whatever the user adds on in the fex, so the appendpath in the fex will not be respected by the autoprompting facility.

So, if you want this procedure to complete succesfully:
- make sure the movie_list file is present in the directory where you need it
- if the lookup file is not on the server path, specify 'FIND ... IN TEMP/MOVIE_LIST'.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
True I commented out the reference to the temp file to make this work.

In 7.6.1 this still doens't work with that long of Hold name...didn't realize it had changed.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Member
posted Hide Post
So I am cool with locating the master file whereever it needs to be. Then reason I put it in the TEMP directory was to see what other files slowed up also. So that is why we were using app and appendpath.

But what I am trying to do is dynamically control the values that show up in the autoprompting combo box. I could select out of my tables that have a master file, but I don't want all the rows out of the table. I only want some of them and I thought we could do this with a hold file.

Do you have have any suggestions??

Thanks for putting up with a noob. Smiler


WebFocus 7.6.9
Solaris
All output
 
Posts: 5 | Registered: September 21, 2009Report This Post
Expert
posted Hide Post
Steve,

The problem with trying to preprepare a hold file from which to provide values within autoprompting, is that autoprompting is executed before the fex is run, therefore your temp/holdfile will not exist at the time of the autoprompting. - hence Gamps comment
quote:
the hold file has to be in place BEFORE autoprompting is performed


To achieve what you want I would suggest that you build a launch page and load your combo box using a procedure. Alternatively build your launch page for the second report within your fex -

SET MSG=OFF
SET HOLDLIST=PRINTONLY
DEFINE FILE MOVIES
  DESC/A200 = '<option value="' || MOVIECODE || '">' | MOVIECODE || (' - ' | TITLE) || '</option>';
END
TABLE FILE MOVIES
BY DESC
WHERE TITLE CONTAINS 'THE'
ON TABLE SAVE AS MOVIELST
END
-RUN
-HTMLFORM BEGIN
<html>
<head>
<title>Sample of inline HTML combo</title>
</head>
<form name="form1" action="/ibi_apps/WFServlet" method="get">
<input type="hidden" name="IBIF_ex" value="[your report fex]" />
<input type="hidden" name="IBIAPP_app" value="baseapp ibisamp [your app folder(s)]" />
<select name="Moviecode" id=combo1>
!IBI.FIL.MOVIELST;
</select>
<input type="submit" value="Run Report" />
<input type="reset" value="Clear Values" />
</form>
</html>
-HTMLFORM END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     [CLOSED] Hold file to populate dropdown list

Copyright © 1996-2020 Information Builders