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 a requirement. When the report type is changed, the list box(es) not applicable for the report type are disabled and grey. What is the coding technique that will make this happen? Thanks in advance.
To provide you with an example, try the following. It was initially created using Resource layout Painter (yes, I know I don't use it normally, but I thought that I should give an example where you folks can compare it to the HTML code produced from the GUI ). I have aligned the code so that it (should) fit in this window without looking too awful!
Basically, there are four selects. The first one is a report selector that calls a javascript function when the selected value is changed.
The other three have names Country, Car and Model (the names will be used as the WF variable names).
When the report selector is changed, the javascript will disable those SELECTS where the datatype eq 1 and the name attribute eq the selected value.
To hide or show the SELECTS instead, just uncomment the line for el.style.visibility = #value; .
Thanks Tony for the code. In testing the code, when I select Country in the top combobox, it makes the second box active and greys out the remaining boxes as intended, but I was hoping to display a list of countries in that second box. The other selections from the first box make the appropriate box active and the other grey. How would I work the display of appropriate values into the code. I triend uncommenting one of the el.style.visibility = "visible"; statements, but it had no effect
If you have a look at the HTML you will see that the combo boxes are populated by fexes, selctry1, 2 and 3. These are fexes that I've used before and should be able to be found in the Forum somewhere. But basically they are
TABLE FILE CAR
SUM FST.COUNTRY
BY COUNTRY
ON TABLE PCHOLD FORMAT XML
END
with the appropriate fields for selctry2 and 3 for CAR and MODEL respectively.
You will need to ensure that the value for IBIAPP_app is set to something other than "anthony" to match where you place your fexes.
If you intend to chain the combo boxes then, as I have said (and rather than repeat the code ), there is a post out there somewhere with my name on it that provides an example. Actually, there are loads of posts regarding chaining of combo boxes, come to think of it .
The main intention with this post was to give you a basic example to be built upon because every application is different, of course.
The el.style.visibility code can be inter-changed with the el.disabled to actually hide the combo boxes from view instead of disabling them.
T
Edited to correct the HOLD to PCHOLD 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
So what you're saying is that if I supply a selctry1, selctry2 and selctry3 fexes, which I've done with your example code, I should be able to populate the combo boxes. I realize I must change the IBIAPP_app from "anthony" to another folder identitied under apps, which I done. I've tried reexecuting it with the changes you suggest without changing the results.
The fexes should run OK and populate the combo boxes with what you have done. Try running the selctry1 etc. to see the output. You should get an XML document that looks like this (hopefully this will look OK - unless someone edits it )
The other fexes should produce similar output relative to their fields and values.
If you do not get output like this then there is something wrong with your fex. If you do get the same results then there is something wrong in your setup and you might need to supply a value for IBIC_server.
Otherwise it should work fine.
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
Here are my three fexes: -*new SELCTRY1 TABLE FILE CAR SUM FST.COUNTRY BY COUNTRY ON TABLE HOLD FORMAT XML END -*new SELCTRY2 TABLE FILE CAR SUM FST.CAR BY CAR ON TABLE HOLD FORMAT XML END -*new SELCTRY3 TABLE FILE CAR SUM FST.MODEL BY MODEL ON TABLE HOLD FORMAT XML END I get 5 records from selctry1, 10 from selctry2 and 18 from selctry3. I don't know how this simple code, you offered as an example in your previous post, could produce what you suggest in your last post. You said "These are fexes that I've used before and should be able to be found in the Forum somewhere." Can you give me a hint as to where I might find them cause I've had no luck?
Here is the code you provided: < !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
HtmlPage
<script id=IbiOptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls"; var multidrill = "multidrill"; var mntFormValidate = "mntFormValidate"; var dyncalendar = "dyncalendar"; var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,multidrill);
Sorry about that. When I pasted the code in the last post, something went wrong. Here it is again. I'm executing it as an .htm component. I've also executed it as a .fex with -HTMLPAGE BEGIN and END ----------------------------------------------
HtmlPage
<script id=IbiOptionsScript type=text/javascript> var cgipath = "cgipath"; var ibirls = "ibirls"; var multidrill = "multidrill"; var mntFormValidate = "mntFormValidate"; var dyncalendar = "dyncalendar"; var ibiOptions = new Array(cgipath,ibirls,mntFormValidate,multidrill);
The fex code that you posted is almost correct and will produce the XML output as I have inserted above once you change the ON TABLE HOLD to ON TABLE PCHOLD. They have to be targetted at the client machine so that the JavaScript can pick up the XML output. If you don't use PCHOLD the output will only be available to the server and therefore the JavaScript will never receive it and will not show any items in your selects.
I take it you are running from Windows using Dev Studio?
T
Edited to add -
My apologies, but I did have HOLD and not PCHOLD in the sample above ... oops!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