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     [SOLVED] Passing a parameter to dynamic drop down list

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Passing a parameter to dynamic drop down list
 Login/Join
 
Member
posted
I am trying to populate a dynamic drop down list based on a fex that requires a parameter. The parameter is to be provided from a text box on the html page. I cannot figure out how to pass a parameter to the drop down list fex.

I already tried using a chained list which works for a limited number of records, but against a table with hundreds of thousands of records it never responds. Therefore the fex needs a parameter to limit the number of records retrieved.

Thanks,

Dave

This message has been edited. Last edited by: Kerry,


WebFOCUS version 761.
Windows operating system. SQL Server database.
Output: Currently creating Excel and PDF report output.
 
Posts: 14 | Registered: December 14, 2007Report This Post
Guru
posted Hide Post
Dave,

If you have already tried a chain list with no success then a text box will not help you. You would eventually just chain to that.

Why did the chained list not work? Was it the value being passed did not filter the table enough to return a few rows. Was it the filter not being fast enough?

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Expert
posted Hide Post
I can't do it either.
it chokes so easily
you can write a fex to retrieve the list in xml
rather than just point to the field in the db.
you point to the fex instead
and the fex is like:
TABLE FILE thing PRINT CODE CODENAME
ON TABLE PCHOLD FORMAT XML
END
but how you pass a previous parm to it, i have NO IDEA! I've been told AJAX.. if i ever find out, i'll repost here.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Fernando,

The chained list did work on a smaller set of records, however on production data it retrieves hundreds of thousands of records before it trys to filter it and it never responds.

We thought that using a sql query in the dynamic drop list fex with a where clause would solve the problem. We cannot however pass that fex a parameter.

Is it possible to base a list on a sql query right in the HTML code?

Thanks.


WebFOCUS version 761.
Windows operating system. SQL Server database.
Output: Currently creating Excel and PDF report output.
 
Posts: 14 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
Dave,

Check out this post for a method I suggested to Jason when he had slow loading problems.

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, 2004Report This Post
Guru
posted Hide Post
Dave,

If you want to run SQL that uses a parameter, then create fex that contains the SQL and then chain to that.

Fernando


Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
 
Posts: 278 | Registered: October 10, 2006Report This Post
Member
posted Hide Post
Tony,

I tried following your example simply using two chained drop down lists and still cannot get the second list to populate. It seems as though this should have worked.

Fex for drop down list control #1...
TABLE FILE VW_TESTCASE
SUM FST.CASENBR
BY CASENBR
ON TABLE PCHOLD FORMAT XML
END

Fex for drop down list #2...
-DEFAULT &CaseNumber = 'FOC_NONE'
-SET &CaseNumber = IF &CaseNumber EQ 'FOC_NONE' THEN '~' ELSE &CaseNumber;

TABLE FILE VW_LISTCIVILDEFENDANT
SUM FST.PARTYNAME
BY PARTYNAME
WHERE CASENBR EQ '&CaseNumber'
ON TABLE PCHOLD FORMAT XML
END

The 2 controls are chained and control #1 is named CaseNumber. Is there something more I need to do in the Javascript or HTML code to pass the CaseNumber parameter?

Thanks,

Dave


WebFOCUS version 761.
Windows operating system. SQL Server database.
Output: Currently creating Excel and PDF report output.
 
Posts: 14 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
Dave,

Post the two select statements and the chain script from your launch page - don't forget to place you code between [ code] and [/code] tags on the forum.

I'll have a look tomorrow for you and let you know if I see anything wrong.

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, 2004Report This Post
Member
posted Hide Post
Tony,

Here's the complete code. Thanks.

  
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<TITLE>HtmlPage</TITLE>
<BASE href=HTTP://appiway:9080>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<SELECT id=combobox1 style="Z-INDEX: 1; LEFT: 260px; WIDTH: 200px; POSITION: absolute; TOP: 150px" tabIndex=1 name=CaseNumber cacheruntimedata="1" inchainindex="1" chainnumber="0" dynalldisplayvalue="ALL" addalloption="1" ibiapp_app="civil_dev" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datafield displayfield datasource="ddl_case_number.fex" newchainnumber="0"></SELECT> 
<SELECT id=combobox2 style="Z-INDEX: 2; LEFT: 260px; WIDTH: 200px; POSITION: absolute; TOP: 200px" tabIndex=2 name=ddlDefendants cacheruntimedata="1" inchainindex="2" chainnumber="0" dynalldisplayvalue="ALL" addalloption="1" ibiapp_app="civil_dev" ibic_server="EDASERVE" sourcetype="typeFex" datatype="1" datafield displayfield datasource="ddl_defendants.fex" newchainnumber="0"></SELECT> </BODY></HTML>


WebFOCUS version 761.
Windows operating system. SQL Server database.
Output: Currently creating Excel and PDF report output.
 
Posts: 14 | Registered: December 14, 2007Report This Post
Expert
posted Hide Post
3rd...
When creating an HTML launch page that has chained drop down list selection fields you have to edit the source code of the launch page and change all occurrences of cacheruntimedata = ‘1’ to cacheruntimedata = ‘0’.
-s




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Expert
posted Hide Post
Dave,

Where's the script for the chain array? Should be towards the bottom of the "true" HTML which is accessible via edit and not the painter.

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, 2004Report This Post
Member
posted Hide Post
Tony,

Here's the missing code you asked for, although Susannah's suggestion fixed the problem!!

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true">
<SELECT id=combobox1 style="Z-INDEX: 1; LEFT: 260px; WIDTH: 200px; POSITION: absolute; TOP: 150px" tabIndex=1 name=CaseNumber newchainnumber="0" datasource="ddl_case_number.fex" displayfield datafield datatype="1" sourcetype="typeFex" ibic_server="EDASERVE" ibiapp_app="civil_dev" addalloption="0" dynalldisplayvalue="ALL" chainnumber="0" inchainindex="1" cacheruntimedata="0"></SELECT>
<SELECT id=combobox2 style="Z-INDEX: 2; LEFT: 260px; WIDTH: 200px; POSITION: absolute; TOP: 200px" tabIndex=2 name=ddlDefendants newchainnumber="0" datasource="ddl_defendants_sql.fex" displayfield datafield datatype="1" sourcetype="typeFex" ibic_server="EDASERVE" ibiapp_app="civil_dev" addalloption="0" dynalldisplayvalue="ALL" chainnumber="0" inchainindex="2" cacheruntimedata="0"></SELECT>
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=civil_dev name=ibiapp_app>
<SCRIPT id=IBI_ChainScript type=text/javascript>
<!--
window.chain0=new Array(1);
window.chain0[0]=new String("combobox1;combobox2");
window.chain0[1]=0
//--></SCRIPT>


Thanks to everyone!!!


WebFOCUS version 761.
Windows operating system. SQL Server database.
Output: Currently creating Excel and PDF report output.
 
Posts: 14 | Registered: December 14, 2007Report 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     [SOLVED] Passing a parameter to dynamic drop down list

Copyright © 1996-2020 Information Builders