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] WHERE in a FIND for -PROMPT

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] WHERE in a FIND for -PROMPT
 Login/Join
 
Guru
posted
Can you do a WHERE clause in a FIND to limit was is returned?

quote:
-PROMPT &Area.(OR(FIND FAD_DAO_NUM IN ALLSTR WHERE STORE_STATUS_COD EQ 'OP' )).Area.;


Of course this is not working for me, it still displays FAD_DAO_NUM's that I do not want.

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


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Expert
posted Hide Post
I don't believe you can add a where clause to the find command.

Perhaps there is another way to do this.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Platinum Member
posted Hide Post
How about:
FILEDEF ddname DISK ddname.ftm
-RUN
TABLE FILE ALLSTR
PRINT FAD_DAO_NUM
WHERE STORE_STATUS_COD EQ 'OP';
ON TABLE HOLD AS ddname FORMAT ALPHA
END
-RUN
-PROMPT &Area.(OR(FIND FAD_DAO_NUM IN ddname)).Area,;


--------------------------------------------------------------------------------
prod: WF/AS 8.2.05; OmniGen;
In FOCUS since 1991
 
Posts: 104 | Location: United Kingdom | Registered: February 07, 2008Report This Post
<JG>
posted
Really do not see how that can work.

The prompt has to be processed before the hold file is created because it's WebFocus
and so it's a non persistent connection.

and secondly FIND is a function in Modify or Maintain not in Reporting.

and thirdly FIND does not return a data value it returns a 0 if the value does not exist
and number gt 0 if the value does exist
 
Report This Post
Expert
posted Hide Post
JG, please take a look at Developing Reporting Applications > Coding a User Interface > Amper Auto-Prompting > How to Add a Dynamic Single-Select List of Values. FIND is indeed a component of Dialogue Manager and therefore can be used in a prompt.

I think Clinton's suggestion of creating a hold file that contains the desired values for the prompt is the right way to go.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<JG>
posted
Francis quite right about FIND, Completely forgot that one.

However I still do not see how using a hold file will work as the auto-prompt
is actioned before the hold file is generated.
 
Report This Post
Expert
posted Hide Post
JG, you're right - the -PROMPT occurs before any TABLE FILE (despite the -RUN after the TABLE command).


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Here is one way to do this using the FOCCACHE facility. Run one fex to create a HOLD file in FOCCACHE containing the desired values, then run a second fex containing the PROMPT:

Example fex 1 - prompt1.fex:
TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY NE 'ENGLAND'
ON TABLE HOLD AS FOCCACHE/HCOUNTRY
END
-RUN

-SET &RNDM = EDIT(HHMMSS('A8'),'99$99$99');

-HTMLFORM BEGIN
<body onLoad="location='http://localhost:8080/ibi_apps/WFServlet?IBIF_ex=prompt2&|RNDM=!IBI.AMP.RNDM;';">
</body>
-HTMLFORM END

Example fex 2 - prompt2.fex:
-PROMPT &COUNTRY.(OR(FIND COUNTRY IN HCOUNTRY)).COUNTRY.;


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
I may sound like a broken record on this one (if you remember what those are!) but my response, which I've posted a few times before, is not to rely on autoprompting to take care of this type of task. Autoprompting was intended for the MOST BASIC way to prompt for parms without having to create a launch page. When you require ANYTHING beyond that, STICK WITH A LAUNCH PAGE.

This is no knock on Matt - but it's amazing the lengths people go to and the time spent trying to figure out ways to make the autoprompting feature do what they need when a quick launch page through the layout painter will solve the problem. In this case a procedure to dynamically populate a list box would do the trick.

I understand that sometimes developing a specific technique solves having to create hundreds of launch pages. To each, his (or her) own, I guess. I like to call it the Rule of Individuality - "Everyone likes to peel their own banana."


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
I have managed to survive at least ten years without resorting to auto-prompting, I didn't even know how to turn it on until yesterday.

Since the question was about -PROMPT I thought I'd give it a try, but it looks like the topic originator has abandoned this thread...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
-PROMPT breaks a report run through ReportCaster so it has been eliminated from my FOCUS vocabulary.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Guru
posted Hide Post
quote:
Originally posted by Darin Lee:
a quick launch page through the layout painter will solve the problem. In this case a procedure to dynamically populate a list box would do the trick.



Sorry, I have not responded, just been a little busy for a Monday or Tuesday that seems like Monday.

I originally tried to link a procedure to dynamically populate the list box in layout painter. The only issue was that I could not get it to populate the box, but it did open a new window with my result set. My guess is that I did not put it in the right HOLD format.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report This Post
Virtuoso
posted Hide Post
quote:
My guess is that I did not put it in the right HOLD format.


ON TABLE PCHOLD FORMAT XML ??


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Guru
posted Hide Post
Thank you, that worked for me.


WebFOCUS 8.1.05
 
Posts: 496 | Registered: January 04, 2008Report 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] WHERE in a FIND for -PROMPT

Copyright © 1996-2020 Information Builders