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 have to modify one of the list boxes in an existing launch page in Developer Studio that displays the alpha state names. Currently the list box allows users to only select one state. I need to add javascript that will allow the users to select multiple states. Can someone provide me with sample javascript code that will allow multiple selections on state? Listed below are the details of the list box. Thanks so much.
Listbox name: listbox2 Data Type: Dynamic Embedded procedure that table files a view that displays the alpha full name states in a XML file. It's sorted by Value in Ascending order.
Windows 7 WF 8009This message has been edited. Last edited by: Michele Brooks,
JavaScript is a programming language. HTML is a markup language. It doesn't mix like that.
I can't tell what your trying to do. Your question was how do you multi-select in JavaScript, but JavaScript isn't what does the multi-select, so I'm a bit confused with your second question.
OnClick is a function of Javascript, but that would mean you want to do something else, besides a multi-select. Please tell us what your end goal is here.
Also, this isn't a WF question, this is a basic HTML 101 question. You might want to pick up a book or scroll through some google results first.
- FOCUS Man, just FOCUS! ----------------------------- Product: WebFOCUS Version: 8.1.04 Server: Windows 2008 Server
My apologies for mixing javascript with html. I want the users to be able to make multiple selections of the state when running a report from a launch page. Currently, the listbox2 parameter is an embedded procedure that contains a table file request to get a list of states and then is put on PCHOLD FORMAT XML. Would I replace the markup code you gave me with what's already there and would it still be considered an embedded procedure? Thanks.
If you are using the html editor (whatever it's called theses days), under the properties of the select box sold be an option for multiple. Setting that to yes will give you the functionality you desire. Otherwise if you are directly editing the html, adding the attribute suggested above to the select tag will do it as well.
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
If you have your states hard coded then just selecting Multiple in the properties will do the trick.
If you are loading them dynamically you need the OR in the FIND statement like this, and then the Multiple selection. No javascript or html coding needed:
WHERE ( filename.segname.STATE EQ &STATE.(OR(FIND STATE IN filename)).STATE. )
WHERE ( filename.segname.STATE EQ &STATE.(OR(FIND STATE IN filename)).STATE. )
Thanks to all. Sorry for not explaining my issue correctly. Sounds like I need to do what George suggested, add the where clause to the fex because the states are loaded dynamically.
When the html page was created by someone else, who no longer works for the company, he binded the listbox that dynamically displays the states to a parameter in the fex. I think I have to unbind that parameter and bind the new state code parameter that I will be now using. Correct me if I'm wrong. Thanks.
Thanks George, your solution worked like a charm. I didn't have to unbind after all. I only needed to add the multiple OR WHERE clause as you suggested and my HTML page worked perfectly. I did, however, have to remove the outer parenthesis because I kept getting a syntax error. I pasted a Car file example below to show what worked. Thanks again.
WHERE CAR.CAR.COUNTRY EQ &COUNTRY_NAME.(OR(FIND CAR.CAR.COUNTRY IN CAR)).COUNTRY.;
This post was solved until I ran into a problem running my report without choosing a state selection.
I have the following multiple state WHERE clause coded in a fex. When I select multiple states from the HTML Composer page it runs correctly. It also runs correctly when I choose one state. The report does not run if I don't select a state and just let it default to ALL. I need to be able to run this report by either choosing multiple states, one state or no states. Thanks.
WHERE tablename.tablename.STATE_CODE EQ &JURIS_ST.(OR(FIND tablename.tablename.STATE_CODE IN tablename)).STATE_CODE.;
Michele, try adding this somewhere near the top of your fex file:
-DEFAULT &JURIS_ST='_FOC_NULL';
That should cause the reporting server to remove this part of your WHERE conditional test when ALL is selected (resulting in all states being returned):
WHERE tablename.tablename.STATE_CODE EQ &JURIS_ST.(OR(FIND tablename.tablename.STATE_CODE IN tablename)).STATE_CODE.;
This works for me when I create WebFOCUS reports with multiple selections.
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
Thank you, thank you, thank you. I can't believe how well that worked. Thanks so much for the quick response. I will be closing this post again as SOLVED. Thanks again.
I am reopening this posts because I get an error message when I use the following WHERE clause that allows multiple selections in a launch page. The data type of the field that is referred to in the WHERE clause is described in the Oracle view as varchar2. I'd appreciate any assistance. Pasted below is the WHERE clause, data type and the error message that I receive. Thanks.
WHERE tablename.tablename.CLM_ID EQ &CLMOFF_ID.(OR(FIND tablename.tablename.CLM_ID IN tablename)).CLM_ID.;
Column Name/Data Type in the Oracle view: CLM_ID/VARCHAR2 (128 Byte)
Error Message: (FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
This message has been edited. Last edited by: Michele Brooks,
if you add a -SET &ECHO=ALL to the beginning of your .fex, you'll see the code as it's sent to the Reporting Server. Take a look at what the WHERE looks like there and it'll make sense.
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
It appears that the value of the varchar2 (128 byte) field in the Oracle view is being interpreted as a numeric. Pasted below is the output that is causing the error. Any suggestions? Thanks.
WHERE TABLENAME.TABLENAME.CLM_ID EQ 000000000000007827
1. Is it possible that there's another TABLENAME.mas in your app path? 2. What happens if you run this .fex without the HTML Launch page and let WF auto prompt you? Does it still error out? 3. Do you have a -SET &CLMOFF_ID or -DEFAULT &CLMOFF_ID? If you set them to a number, you are telling WF to expect a numeric prompt.
WF assigns the format it finds in &CLMOFF_ID.(OR(FIND tablename.tablename.CLM_ID IN tablename)) to the &CLMOFF_ID. I don't think it'll make a difference, but try adding the format to the syntax as follows and test:
&CLMOFF_ID.(OR(FIND tablename.tablename.CLM_ID IN tablename|FORMAT=A128))This message has been edited. Last edited by: BabakNYC,
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
If you follow the trail of the original post you will see that I had a state field (format A2) that needed multiple selection capability in a launch page. I was told to use the following where clause.
WHERE tablename.tablename.STATE_CODE EQ &JURIS_ST.(OR(FIND tablename.tablename.STATE_CODE IN tablename)).STATE_CODE.;
The -DEFAULT that was set for &JURIST_ST was -DEFAULT &JURIS_ST = '';
The report ran correctly from the launch page when one state or multiple states were selected, but it did not run correctly if ALL states were selected. It was then suggested that I change the -DEFAULT setting for &JURIS_ST to -DEFAULT &JURIS_ST ='_FOC_NULL';
After making the -DEFAULT change, everything worked correctly. I'm now working on another launch page that have two additional fields besides the state field that need multiple selection capability. I used the same code as I did for the multi-state selection. The only difference between the state field and the additional two fields is the format of the fields. The two new fields are varchar2 (128 bytes). When the other two fields are selected from the launch page, WebFocus returns the error (FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED The output that displays shows the state code being interpreted as an alpha with quotes around it, but the other field that has a format of varchar2 (128 bytes) is being interpreted as numeric showing no quotes surrounding it.
WHERE TABLENAME.TABLENAME.STATE_CODE EQ 'VA'
WHERE TABLENAME.TABLENAME.CLM_ID EQ 000000000000007827
You need to have the same format between CLM_ID and your parm &CLMOFF_ID. Try to define CLM_ID as a numeric and use it in the WHERE clause
DEFINE FILE tablename
CLM_IDD /I18 = EDIT(CLM_ID, '999999999999999999');
END
...
WHERE CLM_IDD EQ &CLMOFF_ID.(OR(FIND tablename.tablename.CLM_ID IN tablename)).CLM_ID. ;
But I'm afraid of your CLM_ID which is a A128V... What is it displayed by the auto-prompt of that field and what is the result of the WHERE clause if you multi-select CLMOFF_ID ?This message has been edited. Last edited by: MartinY,
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Thanks so much Martin Y, your suggestion worked. I tried to use a define also, but I did not code my WHERE statement correctly. In your example you showed me where I went wrong. Thanks again for saving the day because this launch page has to go into production TODAY! Also, thank you too BabakNYC for looking at my post and responding. I love the interaction in Focal Point. It has saved many a day. Thanks again.