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     Multiple Value Text Box

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Multiple Value Text Box
 Login/Join
 
Member
posted
New to focal point. I have a need to allow users to enter multiple values in a text box. This text box would then be included as part of the WHERE clause in my SQL statement for record selection. This is not selecting from a list box, but a user entering multiple values for selection. I have no idea where to begin with this one, any help would be greatly appreciated
 
Posts: 3 | Location: Morrisville, NC | Registered: November 02, 2005Report This Post
Guru
posted Hide Post
You can have them enter the values, separated by a comma or other punctuation. Then use the ARGLEN function to figure out how many values have been put into the &variable (if they are all the same length). Then use the GETTOK function, to break out the values into separate variables. You will have to put that into a Dialogue Manager loop, controlled by the number you have found using ARGLEN.


Assume the textbox value is &VALUEIN, and it the user has put in something like 123456,456456,789789
 
-SET &VALUEINX=&VALUEIN || ',';
-SET &NUMIN=ARGLEN(100,&VALUEINX,'I3')/7;
-SET &N=1;
-REPEAT ENDLOOP &NUMIN TIMES;
-SET &VALUE.&N=GETTOK(&VALUEINX,100,&N,',',6,'A6');
-SET &N=&N + 1;
-ENDLOOP

You should get &VALUE1 = 123456, &VALUE2=456456, &VALUE3=789789

This message has been edited. Last edited by: <Maryellen>,


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
Still having problems. I entered the following code:

-* TEST CODE
-SET &VALUEINX=&BUSUNIT.Enter Business Unit:. || ',';
-SET &NUMIN=ARGLEN(100,&VALUEINX,'I3') / 7;
-SET &N=1;
-REPEAT ENDLOOP &NUMIN TIMES;
-SET &VALUE.&N=GETTOK(&VALUEINX,100,&N,',',12,'A12');
-SET &N=&N + 1;
-ENDLOOP
-? &
-* TEST CODE

When I run it, I get the following results:

-SET &VALUEINX=123456789012,111111111111 || ',';
-SET &NUMIN=ARGLEN(100,123456789012,111111111111,,'I3') / 7;
-SET &N=1;
-REPEAT ENDLOOP 3 TIMES;
-SET &VALUE1=GETTOK(123456789012,111111111111,,100,1,',',12,'A12');
-SET &N=1 + 1;
-REPEAT ENDLOOP 3 TIMES;
-SET &VALUE2=GETTOK(123456789012,111111111111,,100,2,',',12,'A12');
-SET &N=2 + 1;
-REPEAT ENDLOOP 3 TIMES;
-SET &VALUE3=GETTOK(123456789012,111111111111,,100,3,',',12,'A12');
-SET &N=3 + 1;
-ENDLOOP

The number of values being entered is 2 and the code is producing 3. What is the purpose of the divide by 7. My values are 12 characters long and can contain embedded spaces as well. I must be missing something. Help. Thanks
 
Posts: 3 | Location: Morrisville, NC | Registered: November 02, 2005Report This Post
Guru
posted Hide Post
In my example, my values were six characters long, and one character separator, so I divided by 7. You probably want to divide by 13. You want to find out how many values got input into the &VALUEINX, so you know how many times the loop has to go around.
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Member
posted Hide Post
Got it working. Thanks for your help..
 
Posts: 3 | Location: Morrisville, NC | Registered: November 02, 2005Report 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     Multiple Value Text Box

Copyright © 1996-2020 Information Builders