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.
Thanks alot for your help and advice . In our report , we are adding cascading prompt functionality. For eg - If we have two list-boxes , one list box containing parent field values and the other list box containing child field values. Then the child field list box gets populated according to the values selected in the parent field listbox .
Now after selecting both the list boxes in the design layout of HTML code , i used the add to the chain feature and numbered them accordingly , but i am not able to achieve this cascading prompt. There seems to be a problem , both the listboxes are not displaying data at all, they are totally blank. Am i missing something here?? Is there a catch??Please advice
Thank youThis message has been edited. Last edited by: Kerry,
So in the 2 hours 20 minutes between your postings, what have you done?
Have you used the search facility (top right) to find previous topics on chained selects? If you did you would have found quite a few and each with their own little gem of information. Trying to just change things in your code is not always the best way to learn. Read what problems others have had and try to understand how the underlying processing affects your HTML output.
Does your "parent" combobox populate OK? If not then concentrate on getting this to be correct first. Are you using TypeFex or TypeMaster to populate your comboboxes? If TypeFex, do your fexes produce output? If you "un" chain your comboboxes, do they populate OK? Have you set your variable names correctly in your process components (HTML, fex etc.) Have you ever been able to chain comboboxes using a sample? If the answer to the last question is no, then try an example situation and see how it is achieved. If you are using TypeMaster, are your master files in your path? If you have IBIAPP_app specified in the SELECT tag in your HTML, are the required application folder names correct?
Have you read the manual? Do you understand the different attributes of the select tag in your HTML that are specific to the IBI process?
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
I created a sample report having two listboxes .. one is a parent listbox and the other is a child listbox . ... Without hte chaining option, the listboxes were getting populated fine. But after i select both the listboxes and apply Add to chain option.. I am not getting any data inside both the listboxes..
I am using Type master to populate my listboxes...
I tried chaining comboboxes ..its not working??
The required Application folder names in IBI_APP tag is right.. ui checked it..
Thanks a lot sir for your help , i searched for old posts regarding chained listboxes . I found out that my HTML code is not having the keyword displayfield , but it is having datafield...so i added displayfield keyword with the appropriate column name from the .mas file... now it is working :-) ..
Well done Arvind, a little searching and reading does a lot more than just solve your issues, it supplies you with "free" training! Because you have used the search facility and found previous posts you have probably learned more about the particular usage on chained comboboxes than you knew before, particularly around the different attributes used within the SELECT tag. That has got to be worth the time taken to perform that search and then reading the postings.
As I, and many others, have intimated before, it is better to supply the tools to learn than to just supply the solution.
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
I am facing an issue here regarding cascading prompts. This is the situation,in the report we are using the concept of parent-child hierarchy. We use three listboxes(listbox1 , listbox2 , listbox3) which contains level1 , level2 , level 3 business-capability hierarchy. The parent is residing in listbox 1 and the corresponding children in listbox2 , listbox3. When we select a particular value in the listbox , its corresponding children gets populated in the other 2 listboxes and the same is for listbox2. When i click the run report button, the report should contain all the parent as well as child values.
The catch here is the columns used for populating hte listboxes come from a different datasource. So i generated a hold file to merge two data-sources. The report FEX and the the other FEX used for cascadin prompt.
When i run the report after selecting the values, sometimes the child values are not appearing in the report and it shows an empty report. what can be the problem here??
The three data items do not have to be in the same data source, they can be (and usually are) in independant sources.
The way cascading (or chaining as IB term it) works is that for each combo box that is populated within the chain (think of the order), a call to the server to execute a fex built on the fly within JS creates this sort of code (which assumes you are using typeMaster). Note that the first combobox population would not have a where clause in the adhoc code -
TABLE FILE masterfilename
SUM FST.displayfield
BY datafield
WHERE datafield EQ [name attribute of parent combo.value]
ON TABLE PCHOLD FORMAT XML
END
Thie xml is then passed back to the xmlhttp call and the remaining JS builds the option tags for the current combo box. The JS then moves on to the next one in the chain.
So you can see that you need three attributes NAME DATAFIELD and DISPLAYFIELD.
If you are interested in looking through the JS - be very careful about changing it (I would recommend that you do not change it!!!) - then you can find the JS functions under the ibi_html directory somewhere. It's called ibirls2.js
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 a lot sir , i got t. the cascading prompt is working fine for me..but i have a small issue now...
In all the three listboxes i have a word ALL at the top of the data in it.
The requirement is when a parent value is selected the corresponding shold values are populated in the other listboxes and the data related to all the child and parent values are listed in the boxes.
Now , this "ALL" word is creating probs. whenever all is selected in one of the child listboxes , it shows all the records instead of showing the filtered data.
It interprets ALL as All data ( not all child business capability data).
i forgot to mention one more thing .. I am using a compound WHERE Statement in my FEX program. Is that why FOC_NONE is not working here ?? Is there any alternative ? I have to use compound where statement because i am comparing business capability value from three different columns from a different data-source.
When the focus interpreter encounters FOC_NONE it deletes the line on which it is found. So, if you have a one line WHERE, it will be deleted and all the records will be retrieved. I suggest you decompose your WHERE in many statements. If impossible then write it on many lines in such a way that if a line is deleted the remaining syntax is still valid.
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, 2006
thanks for the info, i just found out that..FOC_NONE disregards the particular where if it encounters FOC_NONE..i am afraid i have to write a compound where statement.. IN ibirls2 Js file , if i change the value of ALL Variable from FOC_NONE to FOC_ALL ..will it work???FOC_ALL will atleast make all the selections in the listbox???
What i want is if a particular parent value is selected , i want all its child values to be displayed in the report.. FOC_NONE is creating some issues for me ..I need to display all the child values in the two listboxes ...
WHERE (BUS_CAPBL_N EQ &BPTW.(OR(FIND LVL_1_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_1_BUS_CAPBL_N.) OR (BUS_CAPBL_N EQ &BPTH.(OR(FIND LVL_2_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_2_BUS_CAPBL_N.) OR (BUS_CAPBL_N EQ &BPF.(OR(FIND SUB_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).SUB_BUS_CAPBL_N.);
I am comparing the BUS_CAPBL_N column in a data-source with three levels LVL_1 , LVL_2 and SUB_BUs..
there is a change in the requuirement. There are only two listboxes in the report.. The first is the parent listbox and the second is the direct child listbox. Depending on the selection in the parent and the child lstbox . the level - 3 child values and the corresponding parent values should get displayed in the report.
the columns are LVL_1_BUS_CAPBL_N . LVL_2_BUS_CAPBL_N SUB_BUS_CAPBL_N in the data source T_ORA_BUS_CAPBL_FLAT_HIER_V.
Is a selection required from your first list box or can it also be "ALL"? If it can you need to put your where statements in &variables. You don't have a value of ALL in your database.
-SET &WHR2=IF '&BPTH.EVAL' EQ 'FOC_NONE' OR 'ALL' THEN '' ELSE 'OR (BUS_CAPBL_N EQ &BPTH.(OR(FIND LVL_2_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_2_BUS_CAPBL_N.)';
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
thank you for the reply. Your where condition retrieves the two level Business capability . Our requirement s when the user selects a value in the second listbox ( first child values). The child level - 3 values are also automatically selected corresponding to a particular selection in the second listbox.
That is , any selection in the second listbox triggers the selection of its child values which will be selected in the report.
Note - There are only two listboxes in the report and we are fetching 3 level hierarchy business capability .
Thank you very much . Your help is really appreciated
WHERE 0
OR (BUS_CAPBL_N EQ &BPTW.(OR(FIND LVL_1_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_1_BUS_CAPBL_N.)
OR (BUS_CAPBL_N EQ &BPTH.(OR(FIND LVL_2_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_2_BUS_CAPBL_N.)
OR (BUS_CAPBL_N EQ &BPF.(OR(FIND SUB_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).SUB_BUS_CAPBL_N.)
;
Like that, if one line gets erased by the FOC_NONE, the WHERE statement still holds.
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, 2006
Make up your mind, are there two or three listboxes?
Your likely problem is a misunderstanding of how FOC_NONE should be used within WHERE clauses. Use the search top right and gain as much knowledge from previous posts as you can. Read and understand the information retrieved and then see what you need to do with your where clause.
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
There are only two listboxes..yup i searched a lot in the forum and i am saturated regarding FOC_NONE..i am asking for an alternative to FOC_NONE..
FOC_ALL and FOC_EVERYTHING dint work for me ..
and one more thing sir ,
LISTBOX 1 LISTBOX2 ALL ALL VALUE 1 VALUE4 VALUE2 VALUE5 VALUE3 VALUE6
If Value 1 is selected in the first listbox and the child values corresponding to Value 1 are Value 4,value 5,value 6 and the cursor is on the "ALL" word in the second listbox.
So , what i want is the report should automatically display the data of Value1 and Value 4 , value 5,value6 .
But , because of FOC_NONE the second listbox is disregarded and i see only the data of value 1 not its child values. So , should i not use the word "ALL" and ask the user to select all the values manually??
FOC_NONE will cause the line that contains it to be ignored, but only if this line is within a define or table. So, circumvent this by first replacing the foc_none value in your fex with something that you can check on, using dialog manager. The DM statements dealing with foc_none will not be ignored, and it allows you to create your own way of testing the values in your table or define.
Hope this helps.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
Sorry, I didn't think that the user could select ALL in both boxes. So the situation, as I understand it is that you have 3 &variables, &BPTW, &BPTH, &BPF, all of which could get the value FOC_NONE. So if they all get the value FOC_NONE then, with my solution, you are left with "WHERE 0'" which, of course, doesn't retrieve any records. So, you could try the following. After the PROMPTS have set values to the &variables, check if they are all FOC_NONE, in which case you add the "OR 1" to the WHERE.
WHERE 0
OR (BUS_CAPBL_N EQ &BPTW.(OR(FIND LVL_1_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_1_BUS_CAPBL_N.)
OR (BUS_CAPBL_N EQ &BPTH.(OR(FIND LVL_2_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_2_BUS_CAPBL_N.)
OR (BUS_CAPBL_N EQ &BPF.(OR(FIND SUB_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).SUB_BUS_CAPBL_N.)
-IF &BPTW NE 'FOC_NONE'
- OR &BPTH NE 'FOC_NONE'
- OR &BPF NE 'FOC_NONE'
- GOTO #WHERE;
OR 1
-#WHERE
;
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, 2006
When you select "All" in your combobox(es) it implies that you want everything in your report, therefore the use of FOC_NONE should suffice for your WHERE clause. As has been mentioned, any line of fex encountered by the parser, containing "FOC_NONE", is "ignored" and therefore any other code on that line is also "ignored". To counteract this many folks resort to spreading any line of code containing two or more phrases, that may or may not be tested against a variable value of "FOC_NONE", over two lines of code.
Therefore (as Danny intimates above) you need to be clever in your approach to it's use. So if you have an input variable for, let's say, &Country and your second input variable is for &Car then on your launch page the implication would be that the test should be "AND". Therefore you would perhaps have the WHERE clause -
WHERE COUNTRY EQ '&Country' AND CAR EQ '&Car'
A problem arises when one or both of the variable values are "FOC_NONE" in as much that either will mean that the line is "ignored". So to overcome this the line needs to be split in two so that each has the possibility of being "ignored" if the variable value is "FOC_NONE".
WHERE COUNTRY EQ '&Country' AND CAR EQ '&Car'
The problem here is that is &Country is FOC_NONE then the line will be "ignored" and the subsequent syntax will be invalid, so being inventive you could take advantage of the implied AND when using two or more unbraced WHERE clauses.
WHERE COUNTRY EQ '&Country' WHERE CAR EQ '&Car'
This way if either variable is FOC_NONE the syntax is still valid and will parse OK. If you wish to use OR syntax then placing a constant such as WHERE 0 or WHERE 1 EQ 1 (as per Danny) before the OR syntax, will see your code through.
Taking it one step further, you wish to apply a compound WHERE clause using ORs. You also have syntax within your wheres that would normally be used to provide input into the autoprompting facilities within WF. I would suggest that this is possibly superfluous as you are using a launch page? If that is true, then take out that code as you don't need it and it only serves to complicate matters. If it not true then please explain what you are hoping to achieve.
Taking the view that your code could be "cleaned" and rid of extraneous code, you should be able to understand why your predicates are not providing you with your expected output.
T
p.s. To where would you like my invoice sent? This message has been edited. Last edited by: Tony A,
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
If that is true, then take out that code as you don't need it and it only serves to complicate matters. If it not true then please explain what you are hoping to achieve.
Taking the view that your code could be "cleaned" and rid of extraneous code, you should be able to understand why your predicates are not providing you with your expected output.
quote:
In my report , we are displaying data of all the business capabilites.All these business capabilities have a parent-child relationship . This hierarchy can go upto 10 levels.
But the business users should see only first two level hierarchy. Level 1 and Level 2 in the two listboxes in the form of cascading prompts. Whenever user selects any value in listbox 2 (Level 2) , the child values corresponding to it should automatically get selected.
The user should not see the business capabilities below level 2 hierarchy in the listboxes. Level 1 values are in Listbox 1 and Level 2 are in Listbox 2..
I need OR condition in my Where clause. And i need amper variables as My HTML passes values to the parameters in the FEX..
WHERE 0 OR (BUS_CAPBL_N EQ &BPTW.(OR(FIND LVL_1_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_1_BUS_CAPBL_N.) OR (BUS_CAPBL_N EQ &BPTH.(OR(FIND LVL_2_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).LVL_2_BUS_CAPBL_N.) OR (BUS_CAPBL_N EQ &BPF.(OR(FIND SUB_BUS_CAPBL_N IN RIP/T_ORA_BUS_CAPBL_FLAT_HIER_V)).SUB_BUS_CAPBL_N.) -IF &BPTW NE 'FOC_NONE' - OR &BPTH NE 'FOC_NONE' - OR &BPF NE 'FOC_NONE' - GOTO #WHERE; OR 1 -#WHERE ;
This condition given by danny..
But what i want is the "ALL" word to work.. Is there any alternative to FOC_NONE??
Arvind, An alternative to FOC_NONE is to add 'All' to the list of possibilities and then look for 'All' in the passed variable using Dialogue Manager. In Dialogue Manager you can then branch, add code or leave out code as needed without having WebFOCUS do this for you.
IHTH.
Greg
current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11