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] Pass a variable to a fex via HTML control

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Pass a variable to a fex via HTML control
 Login/Join
 
Member
posted
I have a listbox control on a HTML page that I need to pass a variable (programID) that is stored on my webpage. Here is the code for the control:

<select id="CLIENT_LIST" multiple=multiple class="select-arial" name="CLIENT_LIST" elementname="CLIENT_LIST" elementtype="listbox" labelid=""
 caption="listbox" operation="OR" ibiformat="" datatype="1" addalloption="0" dynalldisplayvalue="" cacheruntimedata="1" displayfield="_CLIENT_NAME_NBR" 
numofrecords="-1" datafield="CLIENT_ID" sourcetype="typeFex" ibiapp_app="wire" ibic_server="EDASERVE" datasource="populateclients.fex"
 datafieldtype="CHAR" requiredfield="1523434" ></select> 


any ideas?

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


WF version 8105
all output
 
Posts: 28 | Registered: February 17, 2010Report This Post
Expert
posted Hide Post
quote:
programID


I don't see it on your code ?

Where does it come from ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Member
posted Hide Post
Well from my research on this forum, I should just be able to put PROGRAM_ID into a hidden field like this:

  <form id="test_form" action="/ibi_apps/WFServlet" method="get">

	<input type="hidden" IBIC_user="">
	<input type="hidden" name="IBIF_ex" value="checkvar">
	<input type="hidden" name="IBIC_server" value="EDASERVE">
	<input type="hidden" name="IBIAPP_app" value="WIRE">
         <input type="hidden" name="PROGRAM_ID" value="999">



But when I try this, the variable isn't being passed to the fex.


WF version 8105
all output
 
Posts: 28 | Registered: February 17, 2010Report This Post
Expert
posted Hide Post
I see you are using METHOD=GET, does PROGRAM_ID show in the URL generated ?

In your program, if you add "-? &", is it in the list ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Based on your <select> control, it seems like you are using the HTML Layout (Composer in newer versions).

Are you sure you have an actual <form> control in your HTML document? As far as I know, WebFOCUS no longer uses FORM elements to pass parameters to reports from a page.

If you need to add a new parameter, the "usual" method is:

1. Modify your target procedure (.fex) to add a reference to a new &variable. Make sure you default it with -DEFAULT / -DEFAULTS. If you use -DEFAULTH, HTML Composer won't see it.

2. Open your HTML file with the Layout Painter (or Composer, depends on your version of Dev.Studio), right-click your report area in the page (or the Run button inside of your form) and choose "Hyperlink properties ..."

3. Re-select the target procedure from the list. When you do this, a popup window should show up with a list of parameters (you should see your new &variable there) with an option to create a control for it. Choose the control you prefer --- be careful *NOT* to create a new form!! Select your existing form from the drop-down list close to the bottom of the popup window; your form is called "form1" by default unless you've renamed it. Sorry, I don't have Dev.Studio with me right now so I cannot remember those options very clearly.

4. You should now see a new HTML item added the screen linked to the parameter your report needs. Some re-arrangement might be required plus some basic styling to the form. Running the form now should (or so I hope) pass the value to the parameter you expect.

The HTML Layout Painter/Composer creates a whole lot of metadata information inside of the HTML document itself so it is not so simple to try and create your own parameters/controls using the editor anymore -- it't obviously not impossible, just more tedious and risky. It'll be safer to use the GUI in this case, not that it does not come with a dose of frustration Frowner

Hope this helps!

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



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Member
posted Hide Post
I am not using the HTML layout painter to create this page. I started with Dreamweaver to get the overall layout, and I'm adding in the WebFOCUS code as needed. All of my controls work, chains...etc, but I need to add an additional parameter that is located on the HTML page somewhere (hidden if possible). When I use -? & it does not show up.

Is there some sort of attribute to the select statement such as variable="program_id" (kind of like attvariables="program_id" for chained controls) ?

I was able to get the variable passed if I add the hidden control into the chain array and used attvariables, but I was hoping there was a more efficient way.


WF version 8105
all output
 
Posts: 28 | Registered: February 17, 2010Report 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] Pass a variable to a fex via HTML control

Copyright © 1996-2020 Information Builders