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 (with one minor workaround)] 7.6.9 Conditional Chaining

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED (with one minor workaround)] 7.6.9 Conditional Chaining
 Login/Join
 
Guru
posted
Hi all,

I'm trying to take advantage of the 7.6.9 conditional chaining in the following way...

combobox1 is a sigle-select dropdown list and is populated by the following code.
CHECK FILE CAR HOLD
TABLE FILE HOLD
SUM SEGNAME FIELDNAME TITLE
BY SEGNAME
BY FIELDNAME
BY TITLE
ON TABLE PCHOLD FORMAT XML
END

This populates the dropdown list with the names of the fields in the CAR master file.

listbox1 is a multi-select listbox that I want to populate with the VALUES of the particular FIELD selected in combobox1. I'm trying to use code like this...
TABLE FILE CAR
-* I do not know what to put in next line
BY [SELECTED_VALUE_FROM_COMBOBOX1]
ON TABLE PCHOLD FORMAT XML
END


Anybody know how I can use the selected value from combobox1 in the fex that populates listbox1?

Thanks!

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
Dan,

Our product WrapApp has an object called "field list" which automatically produces the list of fields from a specific master and has an &variable associated with it, &FFF, for example. To this object, we attach a fex which populates a list box with the values of the field selected. The list box also has an &variable associated with it, say &LLL.
  
TABLE FILE filename
SUM FST.&FFF
BY &FFF
ON TABLE HOLD AS LISTB1
END
-SET &SW_LISTB1='LLL';

That's it.


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, 2006Report This Post
Guru
posted Hide Post
You will need to write a javascript function that will copy the selected value of combobox1 to a hidden variable during the onChange event of combobox1.
Then you will have simulate the firing of an event in a javascript function. This will simulate the firing of a chaining event.

Take a look at this post that does split-chaining [Solved] Chaining

Fex for the combobox.
  
CHECK FILE CAR HOLD
TABLE FILE HOLD
SUM FIELDNAME
BY FIELDNAME
ON TABLE PCHOLD FORMAT XML
END


Fex for the listbox.
  
-DEFAULT &SEL_FIELD = 'FOC_NONE';
TABLE FILE CAR
SUM
     &SEL_FIELD.EVAL
BY &SEL_FIELD.EVAL
ON TABLE PCHOLD FORMAT XML
END


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Guru
posted Hide Post
Danny-SRL,

I appreciate the fact that your product may have features that meet my needs but I'm trying to work within the framework that I currently have. Also, in my opinion, this developer forum is not the place to sell your wares. This type of predatory marketing will only serve to decrease any credibility you may have. Information Builders has many successful partner relationships with other vendors. Perhaps you should pursue that.

Mighty Max,

Thanks for the tip. I tried something similar to what you are suggesting but without JavaScript. I bound combobox1 to a parameter called FLDSELECT. Then, in the procedure to populate listbox1 I tried to use &FLDSELECT.EVAL but that did not work. I also tried !IBI.AMP.FLDSELECT but that didn't work either.

I'm hoping to make this work with as little hand-coding as possible. I'll keep playing!


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Dan, did you come to the pres Tony and I gave on Tuesday at Summit on chaining? I know you were in Nashville... we actually saw you live and in person...did you miss the Focal Point event?




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
Confused I'd like to add to the comment,
quote:
...this developer forum is not the place to sell your wares...
Which is very true. I don't see a need for implementing third party products, or even mannually adding JavaScript, when WebFOCUS can do a specific function. Afterall, this is a WebFOCUS Forum not a third party forum - imho.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Expert
posted Hide Post
quote:
mannually adding JavaScript

is my expertise and I'm not going to stop because some GUI tool is pulling the wool over the ingénues eyes...


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
this developer forum is not the place to sell your wares

If Dan were hawking a competing product (one that would supplant WF) I'd agree. But for the benefit of those who, despite coverage in the current version of the GUI, would consider rolling their own solution, posting info about the availability of a third-party add-on as an available alternative is a service.

(Note that SRL and WrapApp are featured in an article in the current issue of IB Mag.)


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Guru
posted Hide Post
Susannah - Sadly I did not see your presentation though I wanted to. I'll download the file(s) from the Summit site.

Francis - Coding of any sort is definitely not my expertise. I'm really more of a trainer, demonstrator, techie sales-helper kind of guy. So, for me, I need to make the GUI go as far as I can before I think about adding anything by hand.

Jack - I'm glad to see that SRL and WrappApp have gotten some press from IBI. That lends some credibility to the product offering. I would think the Miscellaneous Announcements forum might be a better place for third party product discussions. In THIS forum to make mention of a tool or website or code snippet that has helped you as a developer is in keeping with the spirit of the forum. To basically reply to a question with, "My product can do that." is not very helpful.

Danny-SRL - Please don't take offense to my comments. Your product does look very impressive and I'm sure is very useful. It's just that, TO ME, as soon as someone tries to sell something in a discussion forum like this, their posts become tainted with an agenda.

In any event, BACK TO THE ORIGINAL QUESTION, last night my train of thought was to run a report from the onChange event of combobox1 and hold the output. Then, populate listbox1 from that hold file. I just have to figure out how to cause listbox1 to re-populate. Am I making this too complicated? I was hoping I could do it with the conditional chaining in 7.6.9 and use the Populate with Alternate option for listbox1 but DevStudio crashes when I add the external procedure to the properties and settings for listbox1. I'll start with a fresh html page and try again. Otherwise I might have to submit a case for that.

Thanks everybody!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Virtuoso
posted Hide Post
Dan, no offense taken.

Jack, thanks for pointing out IB magazine.

Let's not forget that WF is the only product that can provide a full BI development environment from self-service apps to user-defined ad-hoc queries.


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, 2006Report This Post
Guru
posted Hide Post
Good news! This is solved without needing ANY extra JavaScript. The only manual coding I had to do was add
 displayfield="VALUES" datafield="VALUES" 
to the listbox control. Hopefully that will be fixed in the near future.

Thanks go to David Glick and the programming team for getting an answer to me!!

Here is the code for the HTML page (created and run from MRE)...
<!-- Generated by Report Layout Painter -->
<HTML>
<HEAD>
<META id=mycharsetmeta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
<META id=Generation content="Gen 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<SCRIPT id=IBI_nls src="/ibi_html/javaassist/nls.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_nlsVars src="/ibi_html/javaassist/nlsvars.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigbl src="/ibi_html/javaassist/ibi/html/js/ibigbl.js" type=text/javascript></SCRIPT>

<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {

UpdateData();

// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<SCRIPT for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="OVERFLOW: auto" edaconnectionrequired="true" nextelementuniquenumber="2">
<SELECT id=combobox1 style="Z-INDEX: 1; LEFT: 10px; WIDTH: 200px; POSITION: absolute; TOP: 15px" tabIndex=1 name=combobox1 persistentuniqueid="compUid_1"></SELECT>
<SELECT id=listbox1 style="Z-INDEX: 2; LEFT: 220px; WIDTH: 200px; POSITION: absolute; TOP: 15px; HEIGHT: 200px" tabIndex=2 multiple size=3 name=listbox1 persistentuniqueid="compUid_2"></SELECT>
<INPUT id=layoutinfo style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden>
<INPUT id=IBIMR_domain style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=powersys/powersys.htm name="IBIMR_domain">
<INPUT id=IBIMR_folder style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=#testsp12zgnb name="IBIMR_folder">
<INPUT id=ibif_ex style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=app/advchain.htm name="ibif_ex">
<INPUT id=ibiapp_app style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden name="ibiapp_app" ismre="1">
<INPUT id=ibic_server style="LEFT: -100px; POSITION: absolute; TOP: -100px" type=hidden value=EDASERVE name="ibic_server">
<xml id=focus_xmlelement>
<script>

<rootxmlnode top="20" left="1226" width="150" height="130">

<variables></variables>

<input_controls>

<input_control bindcontrolid="compUid_1" inbinding="1" top="80" left="55" width="60" height="20" elementtype="8" name="combobox1" id="combobox1" multiple="0" unresolved="0">

<link linktype="default">

<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">

<data_info datatype="1" sourcetype="typeMaster" modifiedrequest="1" datafield="FIELDNAME" displayfield="" datasource="" ibiapp_app="" IBIMR_domain="powersys/powersys.htm" IBIMR_folder="#testsp12zgnb" selectedvalue="CAR">

<![CDATA[CHECK FILE CAR HOLD
TABLE FILE HOLD
SUM FIELDNAME
BY FIELDNAME
ON TABLE PCHOLD FORMAT XML
END
]]></data_info></condition></link></input_control>

<input_control bindcontrolid="compUid_2" inbinding="1" top="15" left="220" width="60" height="20" elementtype="9" name="listbox1" id="listbox1" multiple="1" unresolved="0">

<link linktype="default" from="compUid_1">

<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0" resolveparameterfq="FIELDNAME" resolveparameter="FIELDNAME">

<data_info datatype="1" sourcetype="typeMaster" modifiedrequest="1" ibiapp_app="#" datasource="" ibic_server="EDASERVE" displayfield="VALUES" datafield="VALUES">

<![CDATA[SET ASNAMES = ON
-DEFAULT &FIELDNAME = 'CAR'
TABLE FILE CAR
SUM &FIELDNAME AS VALUES
BY  &FIELDNAME AS VALUES
ON TABLE PCHOLD FORMAT XML
END]]></data_info></condition></link></input_control></input_controls>

<other_bound_objects></other_bound_objects>

<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Expert
posted Hide Post
Yes, Houston, We have a problem! Actually, it's a BUG. I brought this up in the Expert Room at Summit 09 and it seemed new to them.

Here's the issue: The "Value Field" gets filled in when you "double click" on a field in the MFD (dynamic / data source / CAR.mas). However, the "Display field" does not. You can drag and drop any field into the VALUE or DISPLAY text boxes. It's been logged as an issue... See THIS for image of this issue.

The bottom line, is that the WebFOCUS HTML Painter can do this as well without the manual coding.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Guru
posted Hide Post
Sorry Doug, but I cannot reproduce the issue you describe. If I click the ellipses button next to Value field and double-click a field from the list, both Value Field and Display field get populated. Same with drag and drop. You state you opened a case for this. Please tell me the number so I can take a look.

As far as Dan's issue goes, the field list will only show fields in the master file. By using ASNAMES, these names will not show in the field list and will need to be manually typed in. Dan went to the code itself to do the typing, but you actually can type in the field names in the Properties and Settings dialog directly.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report This Post
Guru
posted Hide Post
Does this workaround work in 7.68? I can't get it to run.

Are my assumptions correct?
1.ComboBox1 is populated by the procedure
CHECK FILE CAR HOLD  
TABLE FILE HOLD
SUM FIELDNAME
BY FIELDNAME
ON TABLE PCHOLD FORMAT XML
END

2. Listbox1 is populated by the procedure
  
SET ASNAMES = ON
-DEFAULT &FIELDNAME = 'CAR'
TABLE FILE CAR
SUM &FIELDNAME AS VALUES
BY  &FIELDNAME AS VALUES
ON TABLE PCHOLD FORMAT XML
END

3.Combobox1 is chained to Listbox1


WebFOCUS 8.1.05M Unix Self-Service/MRE/Report Caster - Outputs Excel, PDF, HTML, Flat Files
 
Posts: 320 | Location: Memphis, TN | Registered: February 12, 2008Report This Post
Guru
posted Hide Post
quote:
Dan went to the code itself to do the typing, but you actually can type in the field names in the Properties and Settings dialog directly.


David, I am not able to type anything in the Value Field or Display Field boxes. From the GUI my only options are to drag a fieldname from a master file or click the ellipses and select a fieldname from there. This is why I had to go to the code to enter those. I submitted a case for that (51752565).


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
 
Posts: 393 | Location: St. Paul, MN | Registered: November 06, 2007Report This Post
Guru
posted Hide Post
Mighty Max: I don't believe this will work in 768 without custom JavaScript. In 769 it works without any custom JavaScript.

Dan: Please forgive me. In 7610 we opened those prompts for typing, so you are correct in that it cannot be typed in the frontend in 769.


David Glick
Director WebFOCUS App Studio
and WebFOCUS Developer Studio
WebFOCUS Division
Information Builders, Inc.
Direct (917) 339-5560
Voice Mail (212) 736-6250 x3560
Fax (212) 947-5168
Email david_glick@ibi.com
 
Posts: 315 | Registered: April 13, 2004Report 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 (with one minor workaround)] 7.6.9 Conditional Chaining

Copyright © 1996-2020 Information Builders