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.
I've been reviewing the messages in Focal Point looking for insight into a problem I'm trying to solve, and I'm hitting a brick wall. Hopefully someone can help.
The task: write in a Header, the list of selected values from a multi-select drop down list built in RLP, in the form of selection1, selection2, selection3 ...
I'm been trying to get to the, I would call it an array, in which the selections are stored behind the scenes but without success.
As I am understanding this, the syntax: WHERE ( COUNTRY EQ &COUNTRY.(OR(FIND COUNTRY IN CAR)).Select COUNTRY. ); creates a list of ampervariables from &COUNTRY0 (in which the count of selected values is stored), to &COUNTRY (which has the complete list of values to be passed to the database as the OR-ed query [ WHERE 'A' OR 'B' OR 'C' ]) to &COUNTRY1 which has the first selected value, to &COUNTRY2 which has the second selected value, and so on.
Or is my understanding incorrect?
I had hoped to loop through the &variables[count] to &COUNTRY0, concatenating the values into a new, Header-ready variable to print out, but I can't "see" the ampervariables WF creates. Nothing in -TYPE, -SET, ? &.
I can parse through the OR statement found in &COUNTRY.EVAL to do what I need to do, but that's rather inelegant compared to traversing a list.
We're running 5.3.5 now, and upgrading to 7.3 in the near future. I see where there are issues with this in the newer version but I would like to get this working in what we have now and deal with the other, later.
Thanks.
WebFocus 7.1.4 Win2K Client
WebFocus 7.1.6 Server
Posts: 22 | Location: san antonio texas | Registered: January 11, 2005
I'm not an expert on multi-select, but if an amper variable is created, it's name can always be put in the heading by putting &VARIABLENAME in the heading has been my experience. However, as I say, haven't done a lot of multi-selections. Will have to see if one of my playing with Dev Studio used that form.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
I found the Java code that runs behind the HTML, and it looks like the @variable comes from the ProcessMultiSelect function there. I don't think the individual selections will be available to the FEX in any form other than the result string that comes from that function.
Parsing the string for the components will probably be the best, if not only, way to go.
Thanks again.
WebFocus 7.1.4 Win2K Client
WebFocus 7.1.6 Server
Posts: 22 | Location: san antonio texas | Registered: January 11, 2005
When you create your multi select you should give it a "name" attribute. This will be the variable name once it gets to WebFOCUS. When you execute a web form with your multi select a value for each selected value will get passed in the resultant URL. The servlet, cgi prog etc will take those values and create a kind of array from them (not an actual array but see below).
For instance, say your multi select has the name "Country", and you select 3 values (call them ENGLAND, FRANCE and GERMANY) before submitting your form. The process of form submission will create the URL from the action string followed by something like this
WebFOCUS interprets them and produces several variables from them.
Pre version 7 you would have access to the following -
&Country = ENGLAND &Country0 = 3 &Country1 = ENGLAND &Country2 = FRANCE &Country3 = GERMANY
Early version 7 you will only get -
&Country0 = 3 &Country1 = ENGLAND &Country2 = FRANCE &Country3 = GERMANY
Now combine that knowledge with other details from this forum (there are so manyand I don't want to repeat them) and you should be able to get your heading the way you want.
Good luck
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, 2004
Thanks for the response, Tony. Yours was the thread that got me interested in trying this, but we've got some confused developers sitting around the screen at the moment.
I see what you are saying, but this is my FEX and then the results. Not given here is the HTML created by WF in Resource Layout (highlighting the fex and right-clicking Edit in Resource Layout and letting WF create the page, just to be specific). The Heading is just to display the multi-select results.
TABLE FILE CAR PRINT COUNTRY CAR MODEL WHERE ( COUNTRY EQ &SELCOUNTRY.(OR(FIND COUNTRY IN COUNTRY)).COUNTRY. );
Ok, seeing the variable listing tells me how your HTML is constructed.
One of the IBI attributes for a multi select is "operation" and it is normally set to "NONE". However, you can change this to "OR" or "AND" to give you alternative variables. Yours must be set to "OR" which gives you a single variable with all selected options included in a compound "OR" statement.
Using that variable must give you the heading you want right? If not what do you want the heading to show?
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, 2004
Using the "OR" gives us the select statement in the WHERE clause we want, so the users can select which "countries" they want to have in the report. The heading is secondary. Seeing the earlier discussions about the ampervariables led me to pursue them as a alternate way (to parsing the returned statement with "OR"'s) to build the heading, but I could not figure out where the alternative variables as you call them, were.
I can now see from the complete help file that the multi-select values are being built, whereas with Resource Layout building the HTM and the multi-select, they are being assigned back, if you will. The array-like variables are not there and to build the heading I want, I will have to parse the ampervariable containing the "ORS".
That's the question I needed answered.
Thanks.
WebFocus 7.1.4 Win2K Client
WebFocus 7.1.6 Server
Posts: 22 | Location: san antonio texas | Registered: January 11, 2005
Well done for figuring out the additional attributes and getting your WHERE clause to use the compound variable! ... and finding out there is always a downside to possible advantages!
This is another example of the grey areas that people encounter of "Where does WebFOCUS end (or start in this case) and the other application s/w begin.
To help make this situation clearer for anyone who is still is a quandry, any web browser used to execute a form will always supply one value for each selection in a multi select (as in my previous post). We have WebFOCUS to thank for rearranging those multiple values into something a little easier to use. If you were to use ASP to perform a similar function you would have to parse the URL string and establish how many values there were. So the web browser supplies one value for each selected option in a multi select. WebFOCUS arranges those values according to the attribute sets applicable to that multi select.
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, 2004