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     HTML screen multi select

Read-Only Read-Only Topic
Go
Search
Notify
Tools
HTML screen multi select
 Login/Join
 
Guru
posted
I am building a screen in the HTML painter. It contains a list that is a multiple select called MBY.

I have built the fex to receive the variable MBY as a multiple using AND.

When I select two items I get:
'CAR' AND 'COUNTRY'
in MBY.

It has quotes around the items and an AND in-between.

I want to build a by not a where using the passed in values.

TABLE FILE CAR
PRINT
CAR
BY &MBY
END

This fails since

BY 'CAR' AND 'COUNTRY'

is a syntax error.

How can I get the html page to pass
BY CAR BY COUNTRY instead of 'CAR' AND 'COUNTRY'?

Note: If I add 'BY ' to the begining of my values in the list box then I get:
'BY CAR' AND 'BY COUNTRY'
which still fails.

Fernando
WF 7.13


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Virtuoso
posted Hide Post
Use STRREP. I would keep the BY bit in as it helps:
-SET &MBY = '''' | 'BY CAR' |''''| ' AND ' | '''' | 'BY COUNTRY' | '''';
-TYPE &MBY
-SET NEWL=&MBY.LENGTH-3;
-SET &MBY = STRREP (&MBY.LENGTH, &MBY, 7, ' AND ', 1, ' X' , &NEWL, 'A&MBY.LENGTH');
-TYPE &MBY
-SET &MBY = STRREP (&MBY.LENGTH, &MBY, 7, '''', 1, ' X' , &NEWL, 'A&MBY.LENGTH');
-TYPE &MBY


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
You don't need to unquote the fieldnames.

By and large Focus tolerates quoted fieldnames and keywords, at least in TABLE.

Try this:

TABLE FILE 'CAR'
'SUM' 'SEATS' 'BY' 'CAR' 'ACROSS' 'COUNTRY'
END
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
You can indeed, in which case don't use the BY option and just replace the AND with a BY. If you keep the BY in, the problem is the quotes are round the both verb and object 'BY CAR'.
Whichever, STRREP can help.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
It would be nicer, and make for better readability, if one could get a list of variables:
Parameter   with value
&MBY0       2
&MBY1       CAR
&MBY2       COUNTRY

And then in the FOEXEC a simple loop:
-REPEAT #LOOP FOR &I FROM 1 TO &MBY0;
BY &MBY.&I
-#LOOP

As of now, STRREP is the answer. I would use OR instead of AND for the multiple valued variable and for the function:
-SET &MBYL=&MBY.LENGTH;
-SET &MBY=STRREP(&MBYL, &MBY, 2 ,'OR', 2, 'BY', &MBLY, 'A&MBYL.EVAL');

And leave the TABLE command with its BY:

TABLE FILE CAR
PRINT
CAR
BY &MBY
END

This takes care of the user choosing only 1 value.

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Platinum Member
posted Hide Post
The 'connector' is part of the &er syntax.
So if you want a 'BY' separator..

&MBY.( BY (COUNTRY , CAR, RETAIL )).Select


Release 7.6.9
Windows
HTML
 
Posts: 226 | Registered: June 08, 2003Report This Post
Guru
posted Hide Post
Gerald,

Thanks for the reply. I tried it and found that I had to remove the .Select otherwise I get
BY CAR.Select when I select CAR.

However, I am only getting CAR and CAR COUNTRY when select both CAR and COUNTRY.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report 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     HTML screen multi select

Copyright © 1996-2020 Information Builders