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     repeating user input

Read-Only Read-Only Topic
Go
Search
Notify
Tools
repeating user input
 Login/Join
 
Virtuoso
posted
I have an application that where my users have to enter one or more StockID (numeric) to get a mail address list.
Now they send me a list of stockid, I put them in a small txt file, copy the file to the baseapp and then I can run the report.

But I would like to give the users the application so they can type in the stockID(s) and run the report themself.

I have the application but it allows only one stockID.
How can I loop that prompt to get a second (and third and....)

The result must be something like

"WHERE STOCKID EQ Number1 OR Number2 OR Numberx"

I'm sure this was somewhere on focalpoint, but I can not find it anymore

Thanks for the help.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Frank,

Expand your input box and teach the users to input:

'123456','654321','111111','222222'

then

WHERE STOCKID IN (&VARIABLE_NAME);

OR

have then input a different way and use GETTOK, POSIT, etc..

Many other ideas will be coming, I'm sure, this is just 1...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<Tim Howard_ABCBS>
posted
You can also use the following code to allow the user to input there value delimited by commas. (ex: 123,345,567,678):


-SET &TSTVAR = '121,232,343,454,565,676';

-DEFAULT &NEWVAR='111111111111111111111111111111111111111111111111111111111111111111111111'
-SET &NEWVAR = STRREP(&TSTVAR.LENGTH,&TSTVAR,1,',',6,''' OR ''',4095,&NEWVAR);
-SET &NEWVAR = '''' || &NEWVAR || '''';
-TYPE &NEWVAR

TABLE FILE TBLNAME
PRINT *
WHERE VARIABLE EQ &NEWVAR
END



Tim H.
 
Report This Post
Virtuoso
posted Hide Post
Frank

Is something like this what you want:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>My selection</title>
<script type="text/javascript">
function processForm() {
var t=escape(document.getElementById("country").value);
var u=t.split('%0A')
for (i in u){
 if (i==0){
 document.getElementById("screen").value =u[i];
  } else {
 document.getElementById("screen").value =document.getElementById("screen").value+" OR "+u[i];
  }
}
document.getElementById("runForm").submit();
}
</script>
</head>
<body>
<div>
<form method="post" name="runForm" id="runForm" action="/ibi_apps/WFServlet">
<input type="hidden" name="IBIF_focexec" id="IBIF_focexec" value="myFex">
<input type="hidden" name="screen" id="screen" value="">
</form>
<p>
<label for="country">Add countries, one per line </label>
</p>
<p>
<textarea name="country" id="country" size="3">
</textarea>
<input type="button" name="button1" id="button1" value="run report" onclick="processForm()">
</p>
</div>
</body>
</html>

with fex
TABLE FILE CAR
PRINT COUNTRY
IF COUNTRY EQ &screen
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Tom, Tim an Alan
thanks for the nice and sometimes obvious simple solutons.
I will give them a try (after the Summit)




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
<Tim Howard_ABCBS>
posted
I am right there with you. I'm trying to get things in line myself to be out for a week.

I'm planning on attending the Focal Point meeting and hopefully meeting some of the people that I've learned so much from.

See ya in Vegas.

Tim H.
 
Report 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     repeating user input

Copyright © 1996-2020 Information Builders